Better typecheck/error message for teachings