Meteor: Error: {{#each}} currently only accepts arrays, cursors or falsey values
<p>I keep getting this error message when I click on the send button. Im trying to create a Instant Messenger app where online users can chat one on one. I am a beginner and I would really appreciate any help. Here is my error message, again it appears in the console once I click the Send button.</p>

<blockquote>
  <p>Exception from Tracker recompute function: meteor.js:862 Error:
  {{#each}} currently only accepts arrays, cursors or falsey values.
      at badSequenceError (observe-sequence.js:148)
      at observe-sequence.js:113
      at Object.Tracker.nonreactive (tracker.js:597)
      at observe-sequence.js:90
      at Tracker.Computation._compute (tracker.js:331)
      at Tracker.Computation._recompute (tracker.js:350)
      at Object.Tracker._runFlush (tracker.js:489)
      at onGlobalMessage (meteor.js:347)</p>
</blockquote>

<p>Here is my HTML</p>

<pre><code>&lt;template name="chat_page"&gt;
  &lt;h2&gt;Type in the box below to send a message!&lt;/h2&gt;
  &lt;div class="row"&gt;
    &lt;div class="col-md-12"&gt;
      &lt;div class="well well-lg"&gt;
        {{#each messages}}
          {{&gt; chat_message}}
        {{/each}}
      &lt;/div&gt;  
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="row"&gt;
    &lt;div class="col-md-12"&gt;
      &lt;form class="js-send-chat"&gt;
        &lt;input class="input" type="text" name="chat" placeholder="type a message here..."&gt;
        &lt;input type="submit" value="Send"&gt;
      &lt;/form&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/template&gt;

&lt;!-- simple template that displays a message --&gt;
&lt;template name="chat_message"&gt;
  &lt;div class = "container"&gt;
    &lt;div class = "row"&gt;
      &lt;img src="/{{profile.avatar}}" class="avatar_img"&gt;
      {{username}} said: {{text}}
    &lt;/div&gt;
  &lt;/div&gt;  
  &lt;br&gt;
&lt;/template&gt;
</code></pre>

<p>Client Side</p>

<pre><code>Template.chat_page.helpers({
  messages: function () {
    var chat = Chats.findOne({ _id: Session.get("chatId") });
    return chat.messages;
  }, 
  other_user: function () {
    return "";
  }
});

Template.chat_page.events({
  'submit .js-send-chat': function (event) {
    console.log(event);
    event.preventDefault();
    var chat = Chats.findOne({ _id: Session.get("chatId") });
    if (chat) {
      var msgs = chat.messages; 
      if (! msgs) {
        msgs = [];
      }
      msgs.push({ text: event.target.chat.value });
      event.target.chat.value = "";
      chat.messages = msgs;
      Chats.update({ _id: chat._id }, { $set : { messages: chat } }); 
      Meteor.call("sendMessage", chat);
    }
  }
});
</code></pre>

<p>Parts of the server side</p>

<pre><code>Meteor.publish("chats", function () { 
  return Chats.find(); 
});

Meteor.publish("userStatus", function () {
  return Meteor.users.find({ "status.online": true });
});

Meteor.publish("userData", function () {
  if (this.userId) {
    return Meteor.users.find({ _id: this.userId },{ fields: { 'other': 1, 'things': 1 } });
  } else {
    this.ready();
  }
  return Meteor.users.find({ "status.online": true });
});

Meteor.publish("users", function () {
  return Meteor.users.find({ "status.online": true });
});

Chats.allow({
  insert: function () { return true; },
  update: function () { return true; },
  remove: function () { return true; }
});

Meteor.methods({
  sendMessage: function (chat) {
    Chats.insert({
      chat: chat,
      createdAt: new Date(),
      username: Meteor.user().profile.username,
      avatar: Meteor.user().profile.avatar,
    });
  }
});
</code></pre>