if (!getInstanceValue(frame, inv, cpg).isInstance())
if (!frame.isValid() || !getInstanceValue(frame, inv, cpg).isInstance())
		public boolean isResourceClose(BasicBlock basicBlock, InstructionHandle handle, ConstantPoolGen cpg, Stream resource,			ResourceValueFrame frame) {			Instruction ins = handle.getInstruction();			if (ins instanceof INVOKEVIRTUAL) {				// Does this instruction close the stream?				INVOKEVIRTUAL inv = (INVOKEVIRTUAL) ins;				if (!getInstanceValue(frame, inv, cpg).isInstance())					return false;				// It's a close if the invoked class is any subtype of the stream base class.				// (Basically, we may not see the exact original stream class,				// even though it's the same instance.)				try {					String streamBase = resource.getStreamBase();					return inv.getName(cpg).equals("close")						&& inv.getSignature(cpg).equals("()V")						&& Repository.instanceOf(inv.getClassName(cpg), streamBase);				} catch (ClassNotFoundException e) {					lookupFailureCallback.reportMissingClass(e);					return false;				}			}			return false;		}