Kotlin var init Check
lateinit var file: File
if (this::file.isInitialized) { ... }
Hjmcoder
lateinit var file: File
if (this::file.isInitialized) { ... }