Types are one mechanism for static analysis. Better contracts (nullability, valid ranges, etc) goes much further.