Improved stringToNumber() function and added the new function isNumeric().