refactor Convert.stringToResult to implement Result.valueOf