get_type somewhat working as check

test plan: make test
fix `ret` type check bug

Test plan:
make test
see failure count go from 8 to 5