def str2bool(string):
    """Quick function that converts a string to bool

    Args:
        string (str): The string to be converted to a bool

    Raises:
        TypeError: Raises an error if string is not of type bool or str

    Returns:
        bool: the converted string
    """
    if isinstance(string,str):
        if string.lower() in ["true", "on", "yes", "1", "t"]:
            return True
        elif string.lower() in ["false", "off", "no", "0", "f"]:
            return False
    elif isinstance(string,bool):
        return string
    else:
        raise TypeError