I am reading Shreve's "Stochastic Calculus for Finance II". In it, he states (Theorem 1.6.1) that if $Z$ is an almost-surely strictly positive random variable on a probability space $(\Omega, \mathcal F, P)$ with $E(Z) = 1$, then the probability measure defined as $\widetilde P(A) := \int_A Z d P$ satisfies $ E(Y) = \widetilde E(Y/Z) $ for any random variable Y (here E and $\widetilde E$ are the expected values in the respective measures). I don't understand the meaning of this expression; $Y/Z$ is not a random variable since there may be $\omega \in \Omega$ upon which $Z$ vanishes.
Is $Y/Z$ a valid expression, or is it shorthand for something more rigorous?