Typecheck and highlight