“The disadvantage of runtime checks is that it … might be too late.”
One significant “too late” problem is that the supplier no longer exists, or refuses to help you, and you don’t have source code.
The “too late” problem is precisely the reason that I proposed a units system for Ada in 1976, and have been proposing a units system for Fortran pretty much continuously for almost twenty years.
(and units checking at runtime is expensive).