Let $N$ be the pmf of a Poisson distribution, $Z$ be a nonnegative random variable, I read in the answer to another question that \begin{align} \mathbb{P}(N(Z)=0) &= \mathbb{E}\mathbb{P}(N(z)=0|Z=z)\\ &= \mathbb{E}e^{-Z}. \end{align}
I get the first equal sign is by Law of total expectation, but I don't understand the second equal sign. Is $\mathbb{P}(N(Z)=0|Z = z) = e^{-Z}$? Intuitively, I can see this equation is correct, but looking at the conditional part, I want to substitute the random variable $Z$ with the given constant $z$ and get $e^{-z}$. Also I tried to use the Bayes theorem, apparently it's wrong but I don't know where I got it wrong, \begin{align} \mathbb{P}(N(Z)=0 | Z=z) &= \frac{\mathbb{P}(N(Z)=0, Z=z)}{\mathbb{P}(Z=z)}\\ &=\frac{\mathbb{P}(N(z)=0)}{\mathbb{P}(Z=z)}\\ &=\frac{e^{-z}}{f(z)} \end{align} Can someone help me understand this concretely? That would be much appreciated.