guard against evaluating invalid expressions