hacked in a type-checker