Hello.
You should check your pointers before accessing them.
if pointer is null, it will return false and the if statement will fall through and no exception will be thrown. Some objects might require you to check to see if they are locked by another thread before accessing them as well.
Cheers.