Condensed duplication check code