Continuous function on $\mathbb{Q}$
Because $\sqrt{2}$ is not in $\mathbb{Q}$, you don't have to check continuity at $\sqrt{2}$: it's completely irrelevant!
Hint: You are right, you need only check continuity around (i.e. nearby) $\sqrt 2$, not at $\sqrt 2$.
$f$ is continuous if it is continuous in every point in $\mathbb Q$. You don't have to check for continuity around a point that does not exist in the domain.
Hint: for all other points, you can see that there exists a neighborhood on which $f$ is constant.