Let $F$ be a given homogeneous polynomial in $\mathbb C[x_0,\ldots,x_n]$. It defines some hypersurface $X=Z(F)$ in $\mathbb {P}^n$. Let $$U:=\{x\in X:\text{$x$ is a non-node singular point in $X$}\}.$$
My question is:
What is the codimension of $U$ in $X$?
In general, Let $S\subset X$ be the closed subset of singular points, so $S$ has codimension at least $1$. I think $U\subset S$ should also be a closed subset, and for $n$ large it should be proper, so $U\subset X$ should has codimension at least $2$. It would be good if we can tell for some given $X=Z(F)$ whether the bound is obtained. Is there some known criterion like this?
Thanks in advance.