Fixed type resolution of BsonObjectId type.