I think something like this may work for you. You can look to see if the variable below is 0 or if it is not equal to the item ID you are feeding the command.
Code:
my $ItemID = 1001; # Set item id to verify here
my $VerifiedID = $client->GetItemStat($ItemID, "id");
if (!$VerifiedID)
{
quest::say("This item does not yet exist.");
}
else
{
quest::say("This item exists.");
}
Haven't actually tested this, but I think it will work.