def check_true_false(variable):
    """
    Checks if the string variable contains
    "true" or "false" else raises error

    Args:
        variable: (str) input variable to be checked

    """
    if variable == "true" or variable == "false":
        return True
    else:
        raise TypeError