Adding a couple sanity checks to help us not read/write from/to dead ports.