Every closed subset of $\mathbb R^2$ is the frontier of a set?

I would like a proof verification, alternative proofs and in general some backround to this problem or related problems:

A closed subset of $\mathbb R^2$ with the euclidean topology is the frontier of a subset of $\mathbb R^2$.

I came up with the following proof: Suppose we want to prove the closed set $C$ is the frontier of a set. Consider the set $A=C\setminus C^\circ \cup S$ where $S=\{(x,y)\in C^\circ | x+y\in \mathbb Q\}$. It is clear the interior of $A$ is empty. Suppose the interior is not empty, then pick a point $x$ in the interior of $A$. There is an open set around $x$ in $A$. This open set must necessarly contain a point of $C^\circ$, so the intersection of the open set with $C^\circ$ is an open set of $S$, but $S$ contains no open sets since in general any non-empty open set of $\mathbb R^2$ has a point with rational sum of coordinates. Therefore $A^\circ=\emptyset$

It is also clear that $\overline A=C$ since every point $x$ that is in $C$ but not in $A$ satisfies that every neighbourhood of $x$ intersects $A$. And so a closed set containing $A$ must contain every such element.

Therefore $Fr(A)=\overline A\setminus A^\circ=C\setminus \emptyset =C$ as desired.

Let $C$ be a closed subset of $\mathbb{R}^2$. If $C$ has empty interior then we are done, because $C$ is the boundary of itself. Otherwise, construct a dense subset of $C$ with empty interior, and call it $D$. Given such a $D$, the closure of $D$ is $C$, and the interior of $D$ is empty, so the boundary of $D$ is $C \setminus \emptyset = C$.
I think this better focuses on the key step, which is the construction of $D$. It also uses some routine topology to smooth out the rest of the proof.