Convert the given input to a boolean value.
    
    Intelligently handles boolean and non-string values, returning
    as-is and passing to the bool builtin respectively.
    
    This process is case-insensitive.
    
    Acceptable values:
    
    True
        * yes
        * y
        * on
        * true
        * t
        * 1
    
    False
        * no
        * n
        * off
        * false
        * f
        * 0
    
    :param input: the value to convert to a boolean
    :type input: any
    
    :returns: converted boolean value
    :rtype: bool

def boolean(input):
    """Convert the given input to a boolean value.
    
    Intelligently handles boolean and non-string values, returning
    as-is and passing to the bool builtin respectively.
    
    This process is case-insensitive.
    
    Acceptable values:
    
    True
        * yes
        * y
        * on
        * true
        * t
        * 1
    
    False
        * no
        * n
        * off
        * false
        * f
        * 0
    
    :param input: the value to convert to a boolean
    :type input: any
    
    :returns: converted boolean value
    :rtype: bool
    """
    
    try:
        input = input.strip().lower()
    except AttributeError:
        return bool(input)
    
    if input in ('yes', 'y', 'on', 'true', 't', '1'):
        return True
    
    if input in ('no', 'n', 'off', 'false', 'f', '0'):
        return False
    
    raise ValueError("Unable to convert {0!r} to a boolean value.".format(input))