code: def _basicload(l: Loader, value: Any, type_: type) -> Any:
      
  
      if type(value) != type_:
          if l.basiccast:
              try:
                  return type_(value)
              except ValueError as e:
                  raise TypedloadValueError(str(e), value=value, type_=type_)
              except TypeError as e:
                  raise TypedloadTypeError(str(e), value=value, type_=type_)
              except Exception as e:
                  raise TypedloadException(str(e), value=value, type_=type_)
          else:
              raise TypedloadValueError('Not of type %s' % type_, value=value, type_=type_)
      return value
docs: This converts a value into a basic type.
  
      In theory it does nothing, but it performs type checking
      and raises if conditions fail.
  
      It also attempts casting, if enabled.