Avoid null exception when there is no next match.

If there is no next match when the page refreshes, then this would
previously have caused no text to have been added to the page.

Change-Id: I49d3a4406173c3ce1d141f2ce6a3d3330b2ddb3e