Fix "attempt to compare number with nil"

- ITEM_QUALITY constants were changed to Lua enums (LE_ITEM_QUALITY) in
6.0