check that rowkeys are unique, throw KeyDuplicatedException otherwise