From the documentation about lateinit:
lateinitproperty before it has been initialized throws a special exception that clearly identifies the property being accessed and the fact that it hasn't been initialized.
So isn’t this essentially removing the NPE for a another exception that’s almost the same as a NPE? I’ve used
lateinit when it’s being handle by DI or if it’s being set in the
onCreate but I use it sparingly and opt for
let in most situations now.