If you find that $\tfrac{\mbox{d}y}{\mbox{d}x} \to \pm\infty$ in the given point, then the tangent line will be a vertical one.
If you feel uncomfortable with this, you could consider the equation as an implicit function $x(y)$ instead of $y(x)$. Then finding $\tfrac{\mbox{d}x}{\mbox{d}y}$ will give you a slope equal to $0$.
Alternatively, if you have covered functions of two variables, write the equation in the form $f(x,y)=0$ and then the tangent line at $(x_0,y_0)$ is also given by:
$${\frac{\partial f}{\partial x}}\bigg\vert_{(x_0,y_0)}\left( x-x_0 \right)+{\frac{\partial f}{\partial y}}\bigg\vert_{(x_0,y_0)}\left( y-y_0 \right)=0$$