Se o tipo for string python
isinstance(s, str)
Fair Fly
isinstance(s, str)
# python 2
isinstance(s, basestring)
# python 3
isinstance(s, str)