You could enforce the types through Checker Framework (at build time), it has the IntelliJ/Eclipse support as well. I don't have personal experience with that, though.