Better ensure term `args` will be wrapped.
Use Lua5.2 `debug.getinfo` to find function arity.
Fix check to catch `nan`.