title: Mongoose findById returns null even with valid id
body: <p>I have already seen the discussion about the following question with a similar title 
  <a href="https://stackoverflow.com/questions/35906859/mongoose-findbyid-returns-null-with-valid-id">mongoose &#39;findById&#39; returns null with valid id</a>
  But my problem is not the database name since all my other connections with the same database in fact the queries on the same collection are working fine.
  I am using mongoose 4.13.6, node js 6.11 and mongo 3.4.
  It is a post request .</p>
  
  <pre><code>var query=req.body;
  </code></pre>
  
  <p>I am sending the search parameters as </p>
  
  <pre><code>var findFruit = 
  {
      _id:query._id
  }
  </code></pre>
  
  <p>When I print my findFruit I get :</p>
  
  <pre><code>_id:'5a1cf77920701c1f0aafb85e'
  </code></pre>
  
  <p>The controller function for this is :</p>
  
  <pre><code>Fruit.findById(findFruit._id,function(err,fruit){
          if( _.isNull(err) ){
              var response = genRes.generateResponse(true,"found successfully");
              callback(response);
          }
          else{
              var response = genRes.generateResponse(false,"there occured some error : "+err);
              callback(response);
          }
      })
  </code></pre>
  
  <p>I even tried find</p>
  
  <pre><code>Fruit.find(findFruit,function(err,fruit){
          if( _.isNull(err) ){
              var response = genRes.generateResponse(true,"found successfully");
              callback(response);
          }
          else{
              var response = genRes.generateResponse(false,"there occured some error : "+err);
              callback(response);
          }
      })
  </code></pre>
  
  <p>The collection for sure has the entry under this id .</p>
  
  <p>I went through this git issue as well <a href="https://github.com/Automattic/mongoose/issues/3079" rel="nofollow noreferrer">https://github.com/Automattic/mongoose/issues/3079</a>
  Unfortunately I cannot downgrade mongoose as it might affect multiple other working functions.
  Edit :
  I tried creating ObjectId like :</p>
  
  <pre><code>var mongoose = require('mongoose');
  var ObjectID = require('mongodb').ObjectID;
  var objectId = new ObjectID();
  // Convert the object id to a hex string
  var originalHex = objectId.toHexString();
  // Create a new ObjectID using the createFromHexString function
  var newObjectId = new ObjectID.createFromHexString(query._id);
  </code></pre>
  
  <p>The model file :</p>
  
  <pre><code>var mongoose = require('mongoose');
  var Schema = mongoose.Schema;
  var ObjectId = Schema.ObjectId;
  
  var FruitSchema = new Schema({
      name : {type : String, unique : true},
      color : {type : String}
  });
  
  module.exports = mongoose.model('Fruit', FruitSchema);
  </code></pre>