var1 = "foo" if isinstance(var1, str): print "var1 is a string"