fix for ec2 module terminating instances outside of inventory -- Fixes #19427 (#26621)
fix for ec2 module terminating instances outside of inventory -- Fixes #19427 (#26621)

* Proposed fix for issue 19427

* Use string_types and to_text for evaluation, if not on empty dict.

* if int, to_text and continue on

thaim/ansible,thaim/ansible