Check for string_types instead of str