Use basestring rather than str