Simplify isInteger logic

Thanks @rauschma http://www.2ality.com/2014/05/is-integer.html