<p>It&#39;s also potentially lossy if you incremented and decremented until integer precision is lost. My vote is for an int type check. No casting. </p>