added error detection to itemPage

added error detection on remove item and add item on the item page