check duplicate object in db