Fix: error in key validation in ModelParams.set