with Lua 5.3, the type detection is not longer a hack
compat with Small Lua