Cleaned up string detection for a deprecation warning by using six.string_types.