We hit an NPE when checking the StateType; guard against it

This shouldn't be possible.  Something is borked.