ModStatusBar: additional null checks to prevent Null Pointer Exceptions