check if obj is a string.