code: def check(self, type_spec, arg_name, decorated_function):
  		def raise_exception(text_spec):
  			exc_text = 'Argument "%s" for function "%s" has invalid type' % (
  				arg_name, Verifier.function_name(decorated_function)
  			)
  			exc_text += ' (%s)' % text_spec
  			raise TypeError(exc_text)
  		if isinstance(type_spec, (tuple, list, set)):
  			for single_type in type_spec:
  				if (single_type is not None) and isclass(single_type) is False:
  					raise RuntimeError(
  						'Invalid specification. Must be type or tuple/list/set of types'
  					)
  			if None in type_spec:
  				type_spec = tuple(filter(lambda x: x is not None, type_spec))
  				return lambda x: None if \
  					x is None or (isclass(x) is True and issubclass(x, type_spec) is True) else \
  					raise_exception(str(x))
  			else:
  				return lambda x: None if (isclass(x) is True and issubclass(x, type_spec) is True) else \
  					raise_exception(str(x))
  		elif isclass(type_spec):
  			return lambda x: None if (isclass(x) is True and issubclass(x, type_spec) is True) else \
  				raise_exception(str(x))
  		else:
  			raise RuntimeError('Invalid specification. Must be type or tuple/list/set of types')