kotlin check if lateinit var has been initialized code example
Example: kotlin check if variable is initialized
lateinit var file: File
if (this::file.isInitialized) { ... }
lateinit var file: File
if (this::file.isInitialized) { ... }