Check for nodeValue in loop for < ie8