from typing import Literal


def is_none(string_: str, default: Literal["raise", False] = "raise") -> bool:
    """
    Check if a string is equivalent to None.

    Parameters
    ----------
    string_ : str
    default : {'raise', False}
        Default behaviour if none of the "None" strings is detected.

    Returns
    -------
    is_none : bool

    Examples
    --------
    >>> is_none('2', default=False)
    False
    >>> is_none('undefined', default=False)
    True
    """
    if default not in ["raise", False]:
        raise ValueError(f"default was '{default}', but should be 'raise' or False")
    none = ["none", "undefined", "unknown", "null", ""]
    if string_.lower() in none:
        return True
    elif not default:
        return False
    else:
        raise ValueError(f"The value '{string_}' cannot be mapped to none.")