Note that if, for some reason, the config item would be missing, current code would fail too. That's why I assumed the config items are properly present. Checks can be added, at the price of adding code complexity.