Check if an expected double is null or a passed in value.
public static bool IsNullOrValue(this double? value, double valueToCheck)
{
return (value ?? valueToCheck) == valueToCheck;
}
call like this...
double dbl = dblToTest.IsNullOrValue();