nil
From GMod Wiki
Revision as of 14:11, 5 December 2010 by SorryForN00B (Talk | contribs)
The value nil in lua means "nothing".
If a global variable or table index is set to nil, it will cease to exist.
If a function returns nothing, it returns nil.
In a condition, nil is equal to false.
When you run into NULL then remember, it is NOT nil.
If you are checking whether an entity exists or not then use either ValidEntity(Ent) or this condition "Ent and Ent:IsValid()". First check if it's nil then if it's valid.