Refactored unique checks