The choice could be made to use a language that is not susceptible to these issues.
Review of type casting operations can identify locations where incompatible types are cast.