Add item check in function