from typing import Dict


def boolean_func(x: str, _: Dict) -> bool:
    """Tests if the string is a valid boolean"""
    if x == "":
        return True
    bool_opts = ["0", "1", "true", "false"]
    return str(x).lower() in bool_opts