Added checks to enhance update compatibility

I recently needed to update this module from 0.1.26 to 0.2.5 and encountered some 500 errors. I've added some simple checks to see if the desired data exists and only execute the inner function only if it does. I haven't had the time to research why the functions were not getting the desired node data, but since it's user data they shouldn't depend on it anyway.