Check for presence of element in node object before using it