def is_type(x, types, full=False):
types = types if isinstance(types, tuple) else (types,)<EOL>ins = isinstance(x, types)<EOL>sub = False<EOL>try:<EOL><INDENT>sub = issubclass(x, types)<EOL><DEDENT>except Exception:<EOL><INDENT>pass<EOL><DEDENT>res = ins or sub<EOL>return res if not full else (res, ins)<EOL>
Returns true if x is of type in types tuple
:param x:
:param types:
:param full:
:return: