def parse_direction_arg(dir_arg):
    """Convert direction arg to bool."""
    if dir_arg is None:
        return None
    elif dir_arg is True:
        return True
    elif dir_arg is False:
        return False
    elif dir_arg == "+":
        return True
    elif dir_arg == "-":
        return False
    elif dir_arg == "0":
        return None
    else:  # what else can be here?
        raise ValueError(f"Illegal direction argument {dir_arg}")