Fix npe when enabling/disabling mondrian cache