using System; namespace BITKit { public static partial class Extensions { public static T IsNull(this T t, Action action) { if (t is null) { action.Invoke(); } return t; } public static T IsNotNull(this T t, Action action) { if (t is not null) { action.Invoke(t); } return t; } } }