Only option I see is to use typed configuration. Define and use appropriate data structures for your config. This itself will prevent the application from compiling, if wrong configurations are used. Most people go with 'any' data type for simplicity but there's your con over pro.