I think the if conditions are needed. nothing prevents you to put the custom statistic in a local mode cache (i.e., only one node). in this case, the rpcManager is null...