Added exception handling when for all BSON.ObjectID() usage in collections.js.