Check against basestring.

This allows us to assign unicode strings with these properties.

Prior to this, if you passed a unicode string in it would be split as
if it were a list.