def resolve_on_off_switch(switch):
    """Returns True if value is On or False if value is Off
    :param switch: The text to validate.
    :type switch: str
    :rtype: bool
    """
    if switch is None:
        raise ValueError('Expecting "on" or "off" value for switch, but value was None.')
    elif switch == 'on':
        return True
    elif switch == 'off':
        return False
    else:
        raise ValueError('Expecting "on" or "off" value for switch, but value was "' + switch + "'.")