def _validate_boolean(value):
    """Validate value is a float."""
    if value not in {True, 'true', False, 'false'}:
        raise ValueError('Only boolean values are valid.')
    return value is True or value == 'true'
