private Optional<T> toOptional() {
        // if element is null, Optional will throw an NPE 
        // just as the standard Stream implementation does.
        return Optional.of(element);
    }
Make the problem someone else's...

@return A "real" Stream with the single element
common-parent/singletonstream/src/main/java/com/speedment/common/singletonstream/SingletonStream.java