Check for null before using AddLocalReference in ti_method

We could incorrectly calling AddLocalReference with a null pointer
during the JVMTI GetLocalObject call. This would cause a check
failure because nulls are not allowed in the table.

Test: ./test.py --host
Test: Manual
Bug: 131856650
Change-Id: Iabc283061c8f3ca8b3f7421ef9de83bb67605402
1 file changed