code: public static double parseDouble(String s, double d) {
  		if (s == null) {
  			return d;
  		}
  		try {
  			return Double.parseDouble(s.trim());
  		} catch (NumberFormatException e) {
  			return d;
  		}
  	}
docs: Parse a <b>double</b> with a given default value <b>d</b>
  
  @return default value if null or not parsable