default <O> Try<O> cast(Class<O> clazz) {
    return map(clazz::cast);
  }
If success, then tries to cast the result to {@code clazz}, turning into a failure if not possible.
planetiler-core/src/main/java/com/onthegomap/planetiler/util/Try.java