Fix Java Lang Nullpointerexception Attempt To Invoke Virtual Method

Fix Java Lang Nullpointerexception Attempt To Invoke Virtual Method