Your validator doesn't allow the config to be just a boolean, so you can eliminate this whole if block.