https://kotlinlang.org logo
#announcements
Title
# announcements
t

Tolriq

11/25/2018, 1:21 PM
The problem is not about the if and item being null it's about checking if item.name is null, but inside the if block compiler can't smartcast to non null, so each time you need a String and not a String? it will show an error and you'll need to add the !!