Here is a way of doing it. Let assume for convenience that you can have as many smaplesample of unknown distribution as you wanted. We also ignore the sign issue and assume $X\ge 0$.
1st step: Generate one million random sample of $\sqrt{X}$.
2nd step: Compute the sample mean, let it be $Y$. Then let $$ Z=\frac{1}{10^{6}}\sum \sqrt{X_{i}} $$
3rd step: Repeat step 2 one million times. Let the generated sample to be $(Z_1,\cdots,Z_{10^6})$. Let the sample mean to be $W$, and substract $W$ from $Z_{i}$ to form $(W_{1},\cdots, W_{10^{6}})$
4th step: Do a QQ plot with $W_{i}/(\sigma/1000)$, $\mu=0$ or carry out any other equivalent normality tests, if the $P$-value is small, reject the hypothesis that $E|X|<\infty$.
The idea is really simple, if $E|X|<\infty$, then $E|\sqrt{X}|$ exists as well and we may apply CLT to $\sqrt{X_{i}}$ and check its normality. I am not sure if this is killing a fly with a hammer, though.