how to check if var is string django code example Example: if type is string python isinstance(s, str)