code: def check(self, type_spec, arg_name, decorated_function):
  		def raise_exception(x_spec):
  			exc_text = 'Argument "%s" for function "%s" has invalid type' % (
  				arg_name, Verifier.function_name(decorated_function)
  			)
  			exc_text += ' (%s should be %s)' % (x_spec, type_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 isinstance(x, tuple(type_spec)) is True else \
  					raise_exception(str((type(x))))
  			else:
  				return lambda x: None if isinstance(x, tuple(type_spec)) is True else \
  					raise_exception(str((type(x))))
  		elif isclass(type_spec):
  			return lambda x: None if isinstance(x, type_spec) is True else \
  				raise_exception(str((type(x))))
  		else:
  			raise RuntimeError('Invalid specification. Must be type or tuple/list/set of types')