Properly coerce NilClass into Lua nil objects