code: function mustBeNonEmptyArray(filter, keyword, field) {
    if (!Array.isArray(filter[field])) {
      return Bluebird.reject(new BadRequestError(`Attribute "${field}" in "${keyword}" must be an array`));
    }
  
    if (filter[field].length === 0) {
      return Bluebird.reject(new BadRequestError(`Attribute "${field}" in  "${keyword}" cannot be empty`));
    }
  
    return Bluebird.resolve();
  }
docs: Verifies that filter.field is an array
  @param filter
  @param keyword
  @param field
  @returns {Promise}