Handle NumberFormatException in parser