Fixed error in add item test. Fixed defect in add item logic. Added exception handling for invalid arguments.