Improve the isNumber() check