Added on duplicate key validation