def is_single_bool(val):
    """Check whether a variable is a ``bool``.

    Parameters
    ----------
    val
        The variable to check.

    Returns
    -------
    bool
        ``True`` if the variable is a ``bool``. Otherwise ``False``.

    """
    # pylint: disable=unidiomatic-typecheck
    return type(val) == type(True)