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