Is there a better way to do this? In the ORM I would just say `$isExisting = $object->getId() ? true : false` for e.g.