Remove is_str and replace by isinstance(..., six.string_types).
Correctly check for string type.