BS-8682 : [Migration SP] NPE : Cannot invoke method text() on null object

- Add a check for "isExternalNode" variable is null or not, to modify the XML file