Added validation for retrieve and delete command types.