code: def has_value(obj, name):
    
    if obj is None:
      return (False, None)
    elif isinstance(obj, dict):
      return (name in obj, obj.get(name))
    elif hasattr(obj, name):
      return (True, getattr(obj, name))
    elif hasattr(obj, "__getitem__") and hasattr(obj, "__contains__") and name in obj:
      return (True, obj[name])
    else:
      return (False, None)
docs: A flexible method for getting values from objects by name.
  
    returns:
    - obj is None: (False, None)
    - obj is dict: (name in obj, obj.get(name))
    - obj hasattr(name): (True, getattr(obj, name))
    - else: (False, None)
  
    :obj: the object to pull values from
    :name: the name to use when getting the value