Checking for the validity of the next element only when the current node is an element start