Check Number Function

Written function to convert a number string into a valid number while
also checking to make sure the number is valid to begin with