Treat string and basestring alike