public static <T> void ifPresentOrElse(Optional<T> value, Consumer<T> action, Runnable emptyAction) {
        if (value.isPresent()) {
            action.accept(value.get());
        } else {
            emptyAction.run();
        }
    }
Invokes a consumer if the Optional has a value, otherwise invoked a
Runnable when the Optional is empty.

@param value Value to check.
@param action Action to invoke if a value is present.
@param emptyAction Runnable to invoke if a value is not present.
@param <T> Type of value.
smithy-utils/src/main/java/software/amazon/smithy/utils/OptionalUtils.java