code: def has_task_of_type(self, typ):
      
      for task_type in self.task_types():
        if issubclass(task_type, typ):
          return True
      return False
docs: Returns True if this goal has a task of the given type (or a subtype of it).