def _booleanise(value):
    """Try to booleanise something, return it unchanged if not possible"""
    try:
        if value.lower() in ['true', 'false']:
            value = value.lower() == 'true'
    except (AttributeError, TypeError):
        pass
    return value
