Title says it all, so is there a way to do something like return false if a value is for example, 3 then return true if it's something like 2.37777777777?
Yes. Something like this function should work:
function isInteger(n) return math.floor(n) == n end