better error message when missing return statements in calculations