Main idea how to solve it: assign something nullab...
# intellij
g
Main idea how to solve it: assign something nullable to local variable, now you can check local variable for null and smart cast knows that nobody can change it and will allow you to use as non-null after check