Let $X,Y$ be complex projective varieties with $X$ irreducible, and let $f:X\dashrightarrow Y$ be a rational map. If $U\subseteq X$ is the largest open set where $f$ can be defined, is it true that $\mathrm{codim}_{X}(X\setminus U)\geq 2$. I know this is true if $X$ is smooth.
Thanks.