def bool_flag(value):
    """
    Handle the ability to pass a parameter that can
    have no value or a boolean value. No value gives
    True (like the switch is on). Absense of the value
    returns False (switch is off). You can also pass
    "TRUE", "True", "true", "1", "FALSE", "False", 
    "false", "0" like: param=True
    """
    if value is None:
        return False
    if value == '':
        return True
    if value.lower() == 'true':
        return True
    if value == "1":
        return True
    if value.lower() == 'false':
        return False
    if value == "0":
        return False