I have 2 options, and I need to take average of the values they hold.
It is possible that one or both may be missing. If one of the value is missing, I would just take other one as the average. But if both are missing, I would resort to some default value.
How can this be done in a clean way?
I can check absence of value using isEmpty, but then how is it different from nullwon't that would be same as null check?