Add safety check to avoid adding NULL packets to queue