Avoid !! (double-bang)—it forces a crash if null. When a non-null property is initialized later (e.g., dependency injection), use lateinit var; for expensive read-only properties computed only on first access, use val db by lazy { ... }.
ADVERTISEMENT