code: function (msg) {
      var self = this;
      if (! _.has(msg, 'collection')) {
        return '';
      } else if (typeof(msg.collection) === 'string') {
        if (msg.collection === '')
          throw Error("Message has empty collection!");
        return msg.collection;
      } else {
        throw Error("Message has non-string collection!");
      }
    }
docs: msg is a trigger or a notification