Added isNM check to Lua.