Use stoken to tokenize SafeString and then use toDouble() and toLong() to convert fields to numbers