Fix formatting out typmod_out
Improve code clarity
Sanity-check typmods