Throwing ParseException for invalid strings.