Making sure you can compare the types is already happening in the compiler, and doesn't find the bug.