Unnecessary if. getChildNodes() returns an empty NodeList if there is no child nodes.