null check for BundleContext