Let $M$ be a 5-manifold (possibly non-orientable), $g\in H^2(M,\mathbb{Z}_2)$ is represented by a map $\tilde{g}:M\to K(\mathbb{Z}_2,2)$. $\text{PD}(g)$ is the submanifold of $M$ representing the Poincare dual of $g$.
$\tilde{g}|_{\text{PD}(g)}$ is the restriction of $\tilde{g}$ on $\text{PD}(g)$, it is a map from $\text{PD}(g)$ to $K(\mathbb{Z}_2,2)$, also represents a cohomology class $f$ in $H^2(\text{PD}(g),\mathbb{Z}_2)$.
My question: Is $\tilde{g}|_{\text{PD}(g)}$ null-homotopic? In other words, is $f$ trivial?
If it is true, please give a simple proof/argument.
If it is false, please give, counterexamples.
Thank you!