Input the following formula in C1:
=IF(ISNA(A1),B1,A1*B1)
Screenshots:
When #N/A:

When not #N/A:

Let us know if this helps.
Input the following formula in C1:
=IF(ISNA(A1),B1,A1*B1)
Screenshots:
When #N/A:

When not #N/A:

Let us know if this helps.