<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __is_valid_type(self, typ, typlist):
 """ Check if type is valid based on input type list "string" is special because it can be used for stringlist :param typ: the type to check :param typlist: the list of type to check :return: True on success, False otherwise """

        typ_is_str = typ == "string"
        str_list_in_typlist = "stringlist" in typlist

        return typ in typlist or (typ_is_str and str_list_in_typlist)