Replace basestring with string_types