docs: public Number asNumber(Object value) throws NumberFormatException {
  
          if(value instanceof Number) {
              return (Number) value;
          }
  
          String str = String.valueOf(value);
  
          return str.matches("\\d+") ? Long.valueOf(str) : Double.valueOf(str);
      }