def METHOD_NAME(a):
    """ returns .value() of Expression, otherwise the variable itself
        We check with hasattr instead of isinstance to avoid circular dependency
    """
    try:
        return a.value() if hasattr(a, "value") else a
    except IncompleteFunctionError as e:
        if a.is_bool(): return False
        raise e