namespace InnovEnergy.Lib.Utils; public static class NullableUtils { public static T? Nullable(this T t) where T : struct => t; public static IEnumerable Enumerable(this T? t) where T : struct { if (t.HasValue) yield return t.Value; } public static T ThrowIfNull(this T? t, String message) where T:struct { if (!t.HasValue) throw new NullReferenceException(message); return t.Value; } }