Checking for emptiness before removing items from the item list.