added canAddChildNode(nodeName, nodeType) that checks if a node with the given name and type can be added