if type == str('l') or str.upper('l'): code example Example: if type is string python isinstance(s, str)