I propose to change this to `isinstance(user, basestring)`
See: http://www.python.org/dev/peps/pep-0008/