def string_is_yes(string, default=None):
    """
    Mapping of a given string to a boolean.

    If it is empty or None (evaluates to False), and `default` is set, `default` is returned.
    If the lowercase of the string is any of ['y', '1', 'yes', 'true', 'ja'], it will return `True`.
    Else it will return `False`

    :param string: The input
    :type  string: str

    :param default: default result for empty input
    :type  default: None | bool

    :return: result (True/False/default)
    :rtype:  bool
    """
    if not string and default is not None:
        return default
    return string.lower() in ['y', '1', 'yes', 'true', 'ja']
