The problem is not about the if and item being nul...
# announcements
t
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 !!