code: function mustBeScalar(filter, keyword, field) {
    if (filter[field] instanceof Object || filter[field] === undefined) {
      return Bluebird.reject(new BadRequestError(`"${field}" in "${keyword}" must be either a string, a number, a boolean or null`));
    }
  
    return Bluebird.resolve();
  }
docs: Checks that filter.field is a scalar value
  @param filter
  @param keyword
  @param field
  @returns {*}