check if next is not defined