isinstance(your_object, basestring)
will be True if your object is indeed a string-type. 'str' is reserved word.
my apologies, the correct answer is using 'basestring' instead of 'str' in order of it to include unicode strings as well - as been noted above by one of the other responders.