public static Collector<Long, ?, OptionalLong> toOptionalLong() {
        return toOptional(OptionalLong::empty, OptionalLong::of);
    }
Returns a {@code Collector} that accumulates 0 or 1 input {@code Long} elements into an
{@code OptionalLong}. The returned collector will throw {@code IllegalStateException} whenever
2 or more elements are present in a stream. Null elements are mapped to
{@code OptionalLong.empty()}.

@return a {@code Collector} which collects 0 or 1 input {@code Long} elements into an
{@code OptionalLong}.
core/src/main/java/org/jdbi/v3/core/collector/OptionalCollectors.java