Some distributions do not have finite/defined mean/variance: How can a distribution have infinite mean and variance?

Is there a way to determine from your sample if the population distribution has undefined mean or variance? Both sample means and sample variances obviously always exist. Would it be using a series of Chi-square goodness of fit tests for common distributions without mean/variance?

Knowing if the population has defined mean/variance would impact your ability to draw conclusions using typical parametric statistical tests.