handle error "can't get item 1 of {}"

handle error "can't get item 1 of {}"