Added typecheck.