The situations where you can know that when a function is called from somewhere it will always be passed values of a certain type are the same in static and dynamic languages (that's how type inference works). And in the situations where you can't, static typing doesn't buy you anything because you'd have to check the type anyway (eg, typecasting unpredictable input from I/O) or use interfaces to accomplish what dynamic languages give you for free via duck typing. (Also poorly and more verbosely.)