def METHOD_NAME(c, div0=None):
    """
    Get value and ignore most exceptions (including division by 0).
    Args:
        c: a Pyomo component to get the value of
    Returns:
        A value, could be None
    """
    try:
        return value(c, exception=False)
    except ZeroDivisionError:
        return div0