Option functional type implementation and scenarios Have you ever being implementing Option&lt;T&gt; functional type? It is discussed here. Basically, it is about using IEnumerable&lt;T&gt; with no or only one element instead of potentially nullable object reference in C#. We can empower LINQ functionality to streamline processing reducing cyclomatic complexity because of no if(null) conditions anymore.

My adoption of the idea looks this way:

public struct Optional&lt;T&gt; : IEnumerable&lt;T&gt;
    where T : class
{
    public static implicit operator Optional&lt;T&gt;(T value)
    {
        return new Optional&lt;T&gt;(value);
    }

    public static implicit operator T(Optional&lt;T&gt; optional)
    {
        return optional.Value;
    }

    Optional(T value)
        : this()
    {
        Value = value;
    }

    public IEnumerator&lt;T&gt; GetEnumerator()
    {
        if (HasValue)
            yield return Value;
    }

    T Value { get; }
    bool HasValue =&gt; Value != null;
    IEnumerator IEnumerable.GetEnumerator() =&gt; GetEnumerator();
    public override string ToString() =&gt; Value?.ToString();
}


It is not so bad. We can use it as argument/return type with automatic conversion to/from T when necessary.

Consumption example might look like this:

 var p = new Product("Milk");
 var basket = ShoppingBasket.Empty
        .Place(p)
        .Place(p)
        .Place(null);


It creates basket with single basket entry for two milk boxes if the following is defined:

public static class ShoppingBasket
{
    public static readonly IEnumerable&lt;BasketItem&gt; Empty =
        Enumerable.Empty&lt;BasketItem&gt;();

    public static IEnumerable&lt;BasketItem&gt; Place(
        this IEnumerable&lt;BasketItem&gt; basket, 
        Optional&lt;Product&gt; product) =&gt;
            basket
                .SetOrAdd(
                    i =&gt; product.Contains(i.Product), 
                    i =&gt; i.OneMore(), 
                    product.Select(p =&gt; new BasketItem(p, 1)))
                .ToArray();  
}


Where:

public class BasketItem
{
    public BasketItem(Product product, int quantity)
    {
        Product = product;
        Quantity = quantity;
    }

    public Product Product { get; }
    public int Quantity { get; }
    public BasketItem OneMore() =&gt; 
        new BasketItem(Product, Quantity + 1);
}

public class Product
{
    public Product(string name)
    {
        Name = name;
    }

    public string Name { get; }
}


I use this general IEnumerable&lt;T&gt; extension:

public static class EnumerableHelper
{
    public static IEnumerable&lt;T&gt; SetOrAdd&lt;T&gt;(
        this IEnumerable&lt;T&gt; source,
        Func&lt;T, bool&gt; predicate,
        Func&lt;T, T&gt; set,
        params T[] add)
    {
        return source
            .SetOrAdd(predicate, set, add as IEnumerable&lt;T&gt;);
    } 

    public static IEnumerable&lt;T&gt; SetOrAdd&lt;T&gt;(
        this IEnumerable&lt;T&gt; source,
        Func&lt;T, bool&gt; predicate,
        Func&lt;T, T&gt; set,
        IEnumerable&lt;T&gt; add)
    {
        var empty = Enumerable.Empty&lt;T&gt;();
        foreach (var item in source)
            if (predicate(item))
            {
                yield return set(item);
                add = empty;
            }
            else
                yield return item;

        foreach (var item in add)
            yield return item;
    }
}


Well, it is pretty functional as far as I can see. But the question is: does it make any sense? Cyclomatic complexity is very low in ShoppingBasket class. But the same time we still have three "virtual paths" of execution to test - for "add" and "replace" in the Place() method + we also need to test for null product argument.

The problem is that they are almost invisible. What do you say? Would you personally prefer to maintain such kind of code in C#?
I'm not a fan of your usage example. The line .Place(null) looks really fishy to me. It looks like something, that should not happen in my imaginary web store, like some kind of error, which I probably want to catch and debug. However Optional&lt;T&gt; class hides this potentioal error completely and my application keeps working as if nothing has happened. Now, if null is for some reason a valid value, then I guess its fine. 

Overall, Optinal&lt;T&gt; class looks OK to me, even though I am having troubles coming up with a sceanrio, where I would find it useful. You could probably group public methods together though, it makes class easier to read.

Also I think you are overusing =&gt; operator. To the point where method's body becomes really hard to read. =&gt; is fine when your function is a short one-liner (i.e. IEnumerator IEnumerable.GetEnumerator() =&gt; GetEnumerator();). But you should probably use braces, when it is not (i.e your Place method).