Linters catch this: https://rules.sonarsource.com/java/RSPEC-4973
Basically the tooling around Java is very evolved and Java static type system helps the IDEs a lot. One of the main reason enterprises prefer Java. Also majority of the tools and IDEs is free for commercial use.