Catch and ignore null pointer exception from Android SDK