Kotlin Periksa apakah variabel diinisialisasi

lateinit var file: File    

if (this::file.isInitialized) { ... }
Hjmcoder