typecheck label before replace