Fix logic in Paginator hasNextPage() method.

Previously was not working when totalItems is 0.