Clearer error message on a type mismatch