Add broker client null pointer checks