Added a function to check whether or not a given packet exists.
Currently, a packet pointer is getting messed up between when a link
sends a packet and when the next node receives it, so this function
helps to determine when that happens.