Use existing functionality to know whether a node has graphic data;
Small enhancement of the code