typecheck code