remove null return from nextOrEndOfStream.

Currently produces NullPointerException if it fails to get the end of the stream, instead of the handy test assertions.
Revert "remove null return from nextOrEndOfStream."

This reverts commit 1857573f458e7802ca46d08c41d262f892bfc3f9.