IFERROR function is the best solution to handle this kind or formula
errors
Description:
Returns
a value you specify if a formula evaluates to an error; otherwise, returns the
result of the formula. Use the IFERROR function to trap and handle errors in a
formula.