I'm working through some notes on showing the essential self-adjointness of the Laplace operator on $\Bbb R$ via the Fourier transform (see here) but there seems to be a little bit of liberty taken at one point which I can't quite justify. It is shown that $-\Delta$ is symmetric on $C_c^{\infty}(\Bbb R)$ and is also positive. These are pretty straightforward as is often the case with differential operators. The part which bothers me is showing that it is in fact essentially self-adjoint.
The easiest way (I think) to do it is via the Fourier transform since the Fourier transform turns the Laplace operator into a multiplication operator. The author wants to show that $\operatorname{Im}(-\Delta\pm i)$ is dense in $L^2(\Bbb R)$, or equivalently $\operatorname{Im}(-\Delta \pm i)^{\perp} = \{0\}$, which is of course one of the equivalent conditions for a symmetric operator to be essentially self-adjoint. I'll replicate the argument here and explain where I think some rigor is missing.
Suppose $g\in L^2(\Bbb R)$ is such that
$$0 = \langle (-\Delta \pm i)f,g\rangle \tag{1}$$
for all $f\in C_c^{\infty}(\Bbb R)$. Since the Fourier transform is unitary, we have
$$0 = \langle \mathcal{F}(-\Delta\pm i)f,\mathcal{F}g\rangle.$$
For $f\in C_c^{\infty}(\Bbb R)$, $-\mathcal{F}\Delta f(x) = 4\pi^2|x|^2\mathcal{F}f(x)$ so this becomes
$$ 0 = \langle (4\pi^2 |x|^2\pm i)\mathcal{F}f,\mathcal{F}g\rangle.$$
We want to show that $g$ is zero, so it stands to reason that we would push $4\pi^2|x|^2\pm i$ onto $\mathcal{F}g$ to then get that
$$ 0 = \langle \mathcal{F}f, (4\pi^2|x|^2\mp i)\mathcal{F}g\rangle.$$
Since the Fourier transform is unitary, $\mathcal{F}(C_c^{\infty}(\Bbb R))$ is dense in $L^2(\Bbb R)$ so this would say that $(4\pi^2|x|^2\mp i)\mathcal{F}g = 0$, giving that $\mathcal{F}g=0$ and so $g=0$ since the Fourier transform is unitary.
Herein lies my problem. There is no guarantee a priori that $(4\pi^2|x|^2\mp i)\mathcal{F}g$ is in $L^2(\Bbb R)$ so we cannot apply this reasoning. The obvious way around this is to require that $g$ be such that $g\in L^2(\Bbb R)$ and $(4\pi^2|x|^2\mp i)\mathcal{F}g\in L^2(\Bbb R)$. The set of $g$ satisfying this is dense since it contains $C_c^{\infty}(\Bbb R)$ by Paley-Wiener (or, better yet, contains the Schwartz space). For such $g$, the above argument would show that $g$ must indeed be the zero function. However it isn't clear to me that this is sufficient to say that any such $g$ satisfying $(1)$ must be zero. Is there something I am missing? Can density arguments be used somehow or is this a fundamentally flawed argument?