validation for no-duplicate key inputs