[WIP] Config labels

We have similar code for parameter substitution, validation and now here. I feel we need to make this type switch more generic, so when we decide to add more field to support parameters, we don't have to add this in three different places.

How about having some generic iterator, that accepts `func` as parameter and then re-use it on places like this?