code: def getmethattr(obj, meth):
    
    if hasmethod(obj, meth):
      return getattr(obj, meth)()
    elif hasvar(obj, meth):
      return getattr(obj, meth)
    return None
docs: Returns either the variable value or method invocation