In this video, Software Craftsman Samir Talwar discusses using your type system to make all these problems go away (at least from the core of your code). As a bonus, one will end up with a much more expressive, readable, maintainable and most importantly, correct code.
Samir has also written a fantastic blog on the topic which you can find here.