Enforcing type checks when theorem matching.