NPE fix and null check for deobfuscation