This also fixes hiding of stats tab in case the respective config option is unset. Previous code raised error logs here.