Use `instanceof ObjectId`.