Add a correct check for number with default value
Merge pull request #46 from Timshel/fix-checkNumber

Add a correct check for number with default value