You can insert whatever level of validation you need at the untyped interface between the two... just as you would with dynamically typed languages.
The difference is that in a statically-typed system, you're validating data at your boundaries such that they comply with your nominal types that are then compiler-guaranteed to be internally consistent.