Actually, it won't work with a null. However, you can do it with 3 formulas.
If (condition) then {table.field} else 0
If (condition) then 1 else 0
if sum(
{@Count where Condition is met}, {group field}) > 0 then
else
0
You'll only put the last formula on your report - it's the average you're looking for. If you're using it as a grand total and not a group total, take out ", {group field}" from the sums.
This process gets the numbers from just the records that match your condition (first formula) and provides a means of counting just the records that match your condition (second formula). You can then use those numbers to calculate the average (third formula).
-Dell