minor fix, added null check after parseNodeList call before calling nodes.getLength()