Wouldn't it make more sense to first cast to int and then check for ``> 0``?