Fixes local variable detection NPE

The returned IJavaElement can be null, this seems to
happen after pasting or class refactoring.

fixes #6