Consolidate the checks for valid config.