adding null check when reading an OSGI service