Compare the types of the expression and the expectation