def negate_filter(value):
    """
    Negates a boolean value.

    If the input is not a boolean, it will be converted to one: bool(value)

    Args:
      value (bool, object): the input
    Returns:
      bool: the inverse
    """
    if not isinstance(value, bool):
        value = bool(value)
    return not value
