Refactored NullPointerDetection to prepare it from being
context-sensitive