tests: move Type check to match_type