------
Say your inventory item is called iYellowStone.
You can do this:
if (player.InventoryQuantity[iYellowStone.ID] == 0) player.AddInventory(iYellowStone);
Since this is a bit technical, a new function was added some time ago: Character.HasInventory.
if (!player.HasInventory(iYellowStone)) player.AddInventory(iYellowStone);
---------
I just noticed you can also do this:
player.InventoryQuantity[iYellowStone.ID] = 1;
The only difference is that setting it directly won't trigger the "inventory was added" event, but I figure you won't need it here anyway, if you're even using it.