public static double?GetDebitValueOrNull(this IHasValue hasValue) { if (hasValue.Value <= 0) { return(hasValue.GetDebitValue()); } return(null); }