type is quite a bit faster than typeof. I recommend using type unless you are specifically looking for a Roblox datatype value (vector3, cframe, color3 etc)
Also, if you’re looking for an integer specifically and not a float, you’re gonna have to use modulo on it to ensure there is no decimal.
So basically,
if type(arg) == 'number' then
if arg % 1 == 0 then
-- do whatever here
end
end