lua_isinteger is missing in LuaState, there should be function. It might also be practical to use it in other places like TypeMAP for conversion.