check the values of those parameters in doPlayerAddItem before calling if something is not null. rewardId is an index in table ?
If ure using tfs 1.3 use player:addItem(itemId[, count = 1[, canDropOnMap = true[, subType = 1[, slot = CONST_SLOT_WHEREEVER]]]])
rather than old compat method.