Could this be done by just guarding the method entry with null check on context? Seems really unlikely that a context would ever return a null system service. I have been known to be wrong.