Good job on the contribution, it's nice that somebody is trying to help out;
As said above, if you null check after performing an action regarding the item, then it's pretty much redundant, so you should always validate the item first. Though, I don't know why so many are bashing when you're just trying to help.