You do the check
Code:
if (checkItemOnGlobalProtectList(currentItemID) or checkItemOnCharacterProtectList(currentItemID)) and
itemValue ~= 0
If itemValue is nil then it is not equal zero. It appears GetItemInfo(currentItemID) is returning a nil for itemValue
Code:
if not itemValue or (checkItemOnGlobalProtectList(currentItemID) or checkItemOnCharacterProtectList(currentItemID)) and
itemValue ~= 0