is it ever possible that self.task_states is `None` or `[]`?