public static Double parseDoubleOrNull(Object tag) {
    return tag == null ? null : tag instanceof Number number ? Double.valueOf(number.doubleValue()) :
      parseDoubleOrNull(tag.toString());
  }
Returns {@code tag} as a double or null if invalid.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/Parse.java