Good Morning Excellers

A B C D
1 1 1 0.5
2 #DIV/0!
3 1 1
4 TOTAL #DIV/0!


Formula in Column D is =1/COUNTA(A1:C1) - this is replicated for Rows 1,2,3
Because Row 2 is blank the formula returns #DIV/0!
I want to remove #DIV/0! so that I can total the values in D4
I have tried several versions of IF(ISERROR, but Excel always tells me that I have entered too many arguments.
Is there any way out of this?
With Regards