Improved type error formatting