Check for node is null, before node.parentNode

Checks that the 'node' variable passed to getParent() function isn't null.

Might be a quirk of how I'm using Grande.js, but kept getting bombarded with these null errors. This little check fixed it up for me.