Type checking is a conservative analysis, and the type correctness of a program is undecidable.  But you can still rely on the knowledge generated by your type checker without having to run your program.  Among other things, this allows you to optimize your program automatically.