remove unnecessary typecheck