title: findOneAndUpdate() returns null in value on upsert
body: <p>I'm new to mongodb and mongoose.</p>
  
  <p>Please help me out! I'm stuck in this problem that I describe below.</p>
  
  <p>I have this static method that I call from a controller(a router).</p>
  
  <pre><code>IDCounterSchema.statics.getNextID = function(collectionName, callback){
  
      this.collection.findOneAndUpdate(
          {name: collectionName},
          {$inc: {sequence:1}},
          {new: true, upsert: true},
          callback
      );
  };
  </code></pre>
  
  <p>But, when I call this on the first time after the initial app launch, it returns null in value.</p>
  
  <pre><code>{ lastErrorObject: { updatedExisting: false, n: 0 },
    value: null,
    ok: 1 } // 1 means the execution succeeded 
            // in fact, i see the inserted data in mongo database.
  </code></pre>
  
  <p>According to <a href="https://docs.mongodb.org/manual/reference/command/findAndModify/#findandmodify-value-field" rel="noreferrer">this mongodb document</a>, it shouldn't be null when upsert&amp;new properties are true.</p>
  
  <p>Because I get null in value property of the returned object, it leads to this error and crush my application.</p>
  
  <pre><code>TypeError: Cannot read property 'sequence' of null
  </code></pre>
  
  <p>But, after the second launch of application, when I call the same static method, it works fine without getting any errors.</p>
  
  <p>Any idea how to solve this problem??</p>