Adds error checking for expression evaluation.