Kernel of polynomial of endomorphism is $\varphi$-invariant 
Let $\varphi$ be an endomorphism on a $K$-vector space $V.$  Set $U=\ker f(\varphi)$, where $f$ is a polynomial with coefficients in $K$.  Show that $U$ is a $\varphi$-invariant subspace of $V.$

This question confuses me because I'm not certain that $U$ is non-empty. For example, if $K = \mathbb{Q}$ and $\varphi$ is the identity map, wouldn't $f(x) = x^2 + x + 1$ contradict this claim? In that case, $U = \emptyset.$

Hint: Use the fact that $f(\varphi)\circ\varphi=\varphi\circ f(\varphi)$
