code: function hasPopulate (options) {
    if (!options) {
      return false
    }
  
    if (typeof options.populate === 'undefined' || options.populate === null) {
      return false
    }
  
    if (_.isString(options.populate)) {
      return !_.isEmpty(options.populate)
    }
  
    if (_.isPlainObject(options.populate) && _.isString(options.populate.path)) {
      return !_.isEmpty(options.populate.path)
    }
  
    if (_.isArray(options.populate)) {
      const t = _.compact(options.populate)
      return !_.isEmpty(t)
    }
  
    if (_.isBoolean(options.populate)) {
      return options.populate
    }
  
    return false
  }
docs: /*!
  Checks whether an options parameter has valid populate options
  @param options
  @returns {*}