fix #861NullPointerException in visitMethodDeclaration

fix #861