title: Mongoose Populate Returns Some Empty Objects
body: <p>I have 1 main collection and 1 collection with a ref to the main one. Code looks like :</p>
  
  <pre><code>// Ref schema
      const onlineSchema = mongoose.Schema({
          _id: {
              type: Number,
              ref: 'Player',
              unique: true
          }
      }, {
          timestamps: true
      });
  
  //main schema
  
  const playerSchema = mongoose.Schema({
  
  _id: { // User ID
      type: Number,
      required: true,
      unique: true,
      default: 0
  },
  firstname: {
      type: String
  },
  name: {
      type: String,
      required: true
  },
  lastname: {
      type: String
  },
  barfoo: {
     type: Boolean
  }
  ...
  
  })
  </code></pre>
  
  <p>I populate it with this code :</p>
  
  <pre><code>var baz = bar;
  ...
          Online.find().populate({
              path: '_id',
              match: {
                  [ baz + 'foo']: true
              }
          }).exec(function(err, online) {
              if (err) {
                  winston.error(err);
              } else {
                  winston.error(util.inspect(online, {
                      showHidden: false,
                      depth: null
                  }));
  
              }
          });
  </code></pre>
  
  <p>If there are 10 elements in online and only 7 match <code>[ baz + 'foo']: true</code> I get 7 proper arrays and 3 empty arrays that look like this:</p>
  
  <pre><code>    { updatedAt: 2016-12-23T18:00:32.725Z,
  createdAt: 2016-12-23T18:00:32.725Z,
  _id: null,
   __v: 0 },
  </code></pre>
  
  <p>Why is this happening and how to I filter the final result so it only shows the matching elements?</p>
  
  <p>I can use filter to remove the null arrays after I get the result but I'd like to know how to prevent the the query from passing null arrays in the first place.</p>