<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _CheckType(value, check_type, name, allow_none=True):
 """Check that the type of an object is acceptable. Args: value: The object whose type is to be checked. check_type: The type that the object must be an instance of. name: Name of the object, to be placed in any error messages. allow_none: True if value can be None, false if not. Raises: TypeError: If value is not an acceptable type. """

  if value is None and allow_none:
    return
  if not isinstance(value, check_type):
    raise TypeError('%s type doesn\'t match %s.' % (name, check_type))