checking if object being compared is a Node instance, so the comparison can be properly done by checking its cargo attribute