Would it be possible to convert the config variable to a SolrParams (e.g.: using SolrParams.toSolrParams)? This way you could use get* methods instead of parsing the string yourself.
+1 – I've often felt the annoying differences between NamedList and SolrParams for the simple name=value cases. A convenience method on NamedList toSolrParams() would make this more obvious. These initializers could be updated to use SolrParams instead. That's obviously a bigger refactoring & scope change than just the spellchecker, but it seems inevitable something broader than just this patch should get done as it's inevitable this same bug pattern will appear again!
Another possible change, possibly simpler, is to have NamedList have getFloatVal, getDoubleVal, getStringVal, getIntVal, getLongVal. It already has getBooleanArg which is named poorly (IMO). And then, update everyone to use these rather than getVal. These added methods could do float/double conversions, treating them equivalently. Maybe String parsing too.