code: function (cmd, callback) {
      if (!cmd || !_.isObject(cmd)) {
        debug(err);
        return callback(new Error('Please pass a valid command!'), null);
      }
      return this.aggregate.validateCommand(cmd, callback);
    }
docs: Returns an error if the command is not valid.
  @param {Object} cmd The command.
  @returns {ValidationError}