improve number/sign behavior when value is NaN or +0 or -0

after merging PR #36 I realized we should also check if value `isNaN`.