code: private static Double getOperandAsNumeric(String op) {
          Double d = null;
          try {
              d = Double.valueOf(op);
          } catch (Exception e) {
              // Null is returned if not numeric.
          }
          return d;
      }
docs: Get an operand as a numeric type.
  
  @param op
  operand as String
  @return Double value or null if op is not numeric