Found something else, sorry 
return processNode ? processNode.getAttribute('name') : '' || '' can return null if the process has no name attribute, because the || operator binds stronger than the inline if. You can try this out by running true ? null : '' || '' , which will return null. You need to use parentheses (true ? null : '') || '' for it to work.
Does it make sense to get the process element by ignoring the namespace? We could try getElementsByTagNameNS with "*" as the namespaceURI. Maybe that works. I would also rename the variable procesNode to processNode