Faster type() function made by storing typenames in closure upvalues