fixed a bug where isInteger didnt work on negative numbers