Added null check for rootNode to prevent crash at

No match.