check that expression doesn't contain errors