You can also use IFERROR function. This function let's you return a desired value with the formula results in an #N/A error.
In your example try: =IFERROR(A1*B1,B1)
So if A1 is a value then it will calculate "A1*B1". If A1 is #N/A this calculation will error trying to multiply, so the formula will just result in "B1".