Update it to throw if hasNext() is false, to match Java's Iterator interface. This also simplifies the null-checking annotations required PiperOrigin-RevId: 277059766