When nil is not nil
This reminds me of a footgun in LuaJIT&#x27;s FFI: nil is generally a falsy value in Lua; a null pointer returned from a C API is equal to nil, but is not a falsy value in LuaJIT.<p>This means that<p><pre><code>    if x and x == nil 
</code></pre>
evaluates to true - a highly unusual condition in Lua. It makes sense if you think about it for a bit, but it really makes you scratch your head when you encounter this situation for the first time.