if语句使用express和mongoDB可逆地在节点js中执行指令

Whenever I tried to execute the code it's not going inside the if statement despite the value of listName is exactly matching with the if condition. List.findOne() is also returning null everytime.

app.post("/", function (req, res) {
  const itemName = req.body.newItem;
  const listName = req.body.list;
  const item = new Item({
    name: itemName
  });
  console.log(listName);
  if (listName === 'Today') {
    console.log("Entered");
    item.save();
    res.redirect("/");
  } else {
    List.findOne({
        name : listName
      }, function(err,foundList){
          console.log(foundList);
          foundList.items.push(item);
          foundList.save();
          res.redirect("/" + listName);
      });
    }
});

您可以检查终端实际返回的内容:

Server started on port 3000
Today 
null
events.js:288
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot read property 'items' of null

问题出在哪里?