Kotlin verifique si se inicializa la variable

lateinit var file: File    

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