def boolean(value):
    """Conversion for yes/no True/False."""
    if isinstance(value, str):
        if value.lower() in ['yes', 'true', '1', u'yes', u'true', u'1']:
            return True

        else:
            return False

    elif isinstance(value, bool):
        return value

    else:
        return None