remove unnecessary (and wrong) typecheck