Wow, this is thorough.

The procedure comparator-type-test might be better named comparator-check-type.  The former name implies that it is returning the test, not the result of the test.