def bool_check(arg, config, default):
    """Return bool from `arg` or `config` str, or `default` bool.

    Arguments from the parser and configuration file are represented as strings.
    Arguments that represent boolean values need string compares, and then
    return the actual boolean object.

    Args:
        arg (str):
        config (str):
        default (bool):

    Returns:
        True, False, or default (bool):

    Raises:
        TypeError
    """

    if arg:
        if arg == 'True':
            return True
        elif arg == 'False':
            return False
        else:
            raise TypeError
    elif config:
        if config == 'True':
            return True
        elif config == 'False':
            return False
        else:
            raise TypeError
    else:
        return default