def _CheckType(value, check_type, name, allow_none=True):
 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)))

def _CheckType ( value , check_type , name , allow_none = True ) : 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 ) ) )
check that the type of an object is acceptable .