Is the restriction of a map representing a cohomology class on its Poincare dual null-homotopic? 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!

It is not true. Think of $M= \mathbb CP^2\times S^1$. $H^2$ is generated by a single element follows from product formula. The element $g$ is the mod-2 reduction of the canonical map $\mathbb CP^2\times S^1 \to \mathbb CP^2\hookrightarrow \mathbb CP^{\infty}$.[since $K(\mathbb Z, 2)= \mathbb CP^{\infty}$] {as Mike observe in the comment}. It's Poincare dual is $\mathbb CP^1\times S^1$ in mod-2 homology. $\mathbb CP^1\times S^1 \to \mathbb CP^1 \hookrightarrow \mathbb CP^{\infty}$ is not null homotopuic. [Thanks to mike for correcting my sloppy mistake].
