Add a little bit of validation to arguments of key index mutating methods in preparation for supporting blueprints 2.5.0 test suite.