Improved unique checker.