Update nextprev.php

Fix for empty posts.