Object? floatToInteger(Object? key) { if (key is double) { double f = key; if (LuaNumber.isInteger(f)) { return f.toInt(); } } return key; }