Is there a way of writing type('') as a constant? What I want to do is check to see if an object is a string. The best I can think of is to do something like: if type(foo) == type('') which would work, but seems kind of silly. Is there no pre-defined object somewhere whose value is <type 'string'>?