fix(objectid): do not try to cast undefined values to object ids

When you try to cast a value of 'undefined' undefined as an object
id, an error is thrown. undefined values often pop up when queries
search for matching values in an array. For instance:

```javascript

var mongoose = require('mongoose');
mongoose.connect("mongodb://localhost/test");
var assert = require('assert');

var Cat = mongoose.model("Cat", {name: String});

Cat.find({_id: {$in: [undefined]}}, function(err, docs) {
  assert.ifError(err);
  assert.equal docs.length, 0
}

```

This script will run into an error.

To fix this, we use an un-strict equality check for the value getting cast to `null`. In Javascript, `null === undefined` is false, while `null == undefined` is true. This unstrict check occurs in a different place with in the same function.

fixes: https://github.com/LearnBoost/mongoose/issues/2411