public static Integer parseIntOrNull(Object tag) {
    return tag == null ? null : tag instanceof Number number ? Integer.valueOf(number.intValue()) :
      parseIntOrNull(tag.toString());
  }
Returns {@code tag} as an integer or null if invalid.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/Parse.java