code: def __is_valid_type(self, typ, typlist):
          
          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)
docs: 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