Optimize `equals` for ObjectIds