Ensure menu_get_object() returns a node before accessing any properties.