static public int IsNull(IntPtr L)
        {
            try
            {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                LuaTypes         t          = LuaAPI.lua_type(L, 1);

                if (t == LuaTypes.LUA_TNIL)
                {
                    LuaAPI.lua_pushboolean(L, true);
                }
                // LUA_TUSERDATA or LUA_TTABLE(Class inherited from Unity Native)
                else if (t == LuaTypes.LUA_TUSERDATA)
                {
                    object o        = translator.SafeGetCSObj(L, 1);
                    var    is_valid = o != null && LuaEnv.ObjectValidCheck(o);
                    LuaAPI.lua_pushboolean(L, !is_valid);
                }
                else
                {
                    LuaAPI.lua_pushboolean(L, false);
                }
                return(1);
            }
            catch (Exception e)
            {
                return(LuaAPI.luaL_error(L, "IsNull" + e));
            }
        }