Handle typeCheck error in Main.hs