fix crash when DQMStore is null

fixes the problems discussed in #2846