How would you check if a String was a number before parsing it?
You can use NumberFormat#parse:
try { NumberFormat.getInstance().parse(value); } catch(ParseException e) { // Not a number. }