Add tests for bad pointers

The code already accounted for this but it's good to test it.