OpenJDK seemed to return NULL in case of exception, but Dalvik returns arbitrary value, so skip such "optimizations".