docs: def _check_id_validity(self, p_ids):
          """
          Checks if there are any invalid todo IDs in p_ids list.
  
          Returns proper error message if any ID is invalid and None otherwise.
          """
          errors = []
          valid_ids = self.todolist.ids()
  
          if len(p_ids) == 0:
              errors.append('No todo item was selected')
          else:
              errors = ["Invalid todo ID: {}".format(todo_id)
                        for todo_id in p_ids - valid_ids]
  
          errors = '\n'.join(errors) if errors else None
          return errors