util.mathcompat This compatibility utility provides the math.type() function for Lua versions that lacking it.