check duplicate values.