Adding null check for binding in LocalVariableDetector

fixes #3