Fixed integer testing in pn.js (handles negatives)