Simplify tryToParse