Object doesn't exist, but if statement still lets it pass.

local item = POINTSHOP.FindItemByID(item_id)
evolve:Notify( LocalPlayer(), evolve.colors.red, tostring( item.TYPE ) )
if item then
if item.Model then
if item.TYPE == MODEL then

–all the other stuff

So I’m trying to get item.TYPE and check if it’s MODEL, HAT, WEAPON, etc… But when I go to print the item.TYPE it returns nil. When I go to do a check if item.TYPE == MODEL it thinks that is a true statement. But it just a second ago said item.TYPE == nil. By this logic it’s saying nil == MODEL… Could this be happening because it thinks MODEL is a variable and since I never stated MODEL as a variable, MODEL is nil? O_O I’m so confused.

This is the general structure of one item
Afro = {
Name = “Afro”,
Enabled = true,
Description = “Gives you a hip afro.”,
Cost = 2000,
Model = “models/dav0r/hoverball.mdl”,
Functions = {
– All the functions and such

[editline]20th June 2012[/editline]

My guess was right, I changed it all to a string and it worked… lol