reftactoring: dryer expr type checker