``return $entity->id === $a2->id;`` would work (and be better by always returning a boolean)