def raise_truthy(d, k, exception=None):
    """Raises exception if value is truthy.

    Parameters
    ----------
    d : dict
    k : str
    exception : Exception, optional

    Returns
    -------
    None

    Raises
    ------
    ValueError
        When dict value is truthy and a custom exception is not passed.

    """
    val = d.get(k)
    if val:
        raise (exception or ValueError(k))
    return val
