test for if next exists