How do you ensure item is not undefined?