Fix detection of MongoId