Improve getId type hints

$item->getId()->getNumericId() is a valid non-deprecated call. Since
the type hint currently is `@return EntityId`, ids don't recognize the
last method.