A 'bad' definition for the cardinality of a set My set theory notes state that the following is a 'bad' definition for the cardinality of a set $x:$ $|x|=\{y:y\approx x\}$ $(y\approx x\  \text{iff} \ \exists\  \text{a bijection}\  f:x\rightarrow y )$
The reason this is a 'bad' definition is since if $x\neq \emptyset$ then $|x|$ is a proper class and I am asked to prove this. 
For the moment, let's consider $x$ to be finite. Say $|x|=n$ as $x$ contains a finite number of elements. 
But then $x\approx \{n+1,...,n+n\}$ as $|\{n+1,...,n+n\}|=n$ and we can 'keep going up' in this way such that  $\bigcup On\subseteq|x|$ and since $\bigcup On = On$  and $On$ is a proper class we must have $|x|$ being a proper class as well.
This argument is certainly not rigourous and I am unfortunately very much stumped on what to do if $x$ not finite.
$\underline{\text{Please correct me if $\ $} \bigcup On \neq On}$ 
Any feedback is very much appreciated. 

It is true that $\bigcup ON=ON$. However, it is not true that $\bigcup On\subseteq\vert x\vert$ - rather, each ordinal is an element of some element of $\vert x\vert$, that is, $ON\subseteq \bigcup \vert x\vert$. This is still enough to get a contradiction, though, by the union axiom.
If $x$ is not finite - no problem! Just consider sets of the form $\{\alpha+\beta: \beta<\kappa\}$, where $\kappa$ is the cardinality (in the usual sense) of $x$, and $\alpha$ is some fixed ordinal. The same picture works.
In fact, we can do better: show that for any set $a$, there is some $C\in \vert x\vert$ with $a\in C$. This will show that $\bigcup \vert x\vert=V$ (and it's easier to show that $V$ isn't a set than it is to show that $On$ isn't a set, although this is a very minor point).
