nil (value)
In the Lua language, the value nil is a special value that is comparable to the boolean value false or the NULL pointer in the C language. The value of nil is distinct and a comparison with 0 or false will return will fail.
Setting a table
or variable equal to nil to cause Lua to delete it from use
and collect its memory usage.
Returned values
can be tested for equality to nil.
Lua returns
nil for variables, functions, etc. that do not exist.