Use ObjectId instead of identifier comparisons