Use string_types instead of str in isinstance.

Ready for review/merge.
why not `from .ext.six import string_types`? It creates some `ext` inter-dependencies, but that seems okay...