Add null check to CheckVirtualMethod

There was a runtime SIGSEGV that should have been a check jni
failure.

Also added regression test.

Bug: 16320699

(cherry picked from commit 167350d9c781c5e3893714bb26ab5cb1c4abf6b4)

Change-Id: I7edea6af6517f1e5628678e824b8307daf491418
2 files changed