The map $\mathbb H\text{P}^{\infty} \to K(\mathbb Z,4)$ representing a generator of $H^4(\mathbb H\text{P}^{\infty};\mathbb Z) = \mathbb Z$ is a rational equivalence.

But is there any honest map in the other direction (before rationalizing, of course) that is not null-homotopic?

And if so, how can we understand the set of all homotopy classes $[K(\mathbb Z,4),\mathbb H\text{P}^{\infty}]$?