If $f$ is measurable and $\int f < \infty$, then $f(x) < \infty$ a.e. I am looking for a hint for what should be a simple proof, but once again I am missing the key connection. Please don't provide a complete solution, nudge me to discover what I am missing.

If $f$ is a measurable non-negative function and $\int f < \infty$, then $\{x : f(x) = \infty \}$ is a null set.

What I am attempting:
Define a function $g(x)$ as follows:
$$g(x) = \left\{\begin{array}{ll} a, & \textrm{if} f(x) = \infty, \\ f(x), & \textrm{otherwise}.\end{array}\right.$$
Then, we have a proposition that states that for measurable $h$, $\int h = 0 \iff h = 0$ a.e.
So what I'm trying to do is set $h = f-g$ and show that $\int h = \int f-g = 0$. This would complete the proof.
If $A = \{x : f(x) = \infty\}$, then I have $\int g = \int_{A^C} g + \int_A g = \int_{A^C} f+ a\mu(A)$. I want to use this in some way to conclude that $\mu(A) = 0$ necessarily.
The only hypothesis I have to work with is $\int f < \infty$. I'm not sure if this is the right approach. Intuitively, I know exactly what the statement means. I just can't identify the machinery needed to get to the conclusion.
 A: For the sake of my own answer:
Define
$$
g(x) = \left\{\begin{array}{ll}
a, & \textrm{if}\ f(x) = \infty, \\
f(x), & \textrm{otherwise}.
\end{array}\right.
$$
Since $g$ is measurable. It is clear that $f \ge g$, so we have $\int f \ge \int g$. However, we may write $\int g$ as follows:
$$
\int g = \int\limits_{\{x : f(x) < \infty\}}\mkern-24mu g\mkern12mu + \mkern6mu \int\limits_{\{x : f(x) = \infty\}}\mkern-24mu g \mkern12mu = \mkern6mu \int\limits_{\{x : f(x) < \infty\}}\mkern-24mu g +\mkern12mu a\mu(\{x : f(x) = \infty\}).
$$
But since we can choose $a$ arbitrarily large and $\int f < \infty$, then it must be the case that $\mu(\{x : f(x) = \infty\}) = 0$.
A: Since you have answered your own question, I'll add my two cents:
Let $E$ be the measurable domain of $f$, then for any $n\in\mathbb{N}$
$$
\{x\in E\,:\,f(x)=\infty\}\subseteq\{x\in E\,:\,f(x)\ge n\}
$$
and by monotonicity of measure we have
$$
m(\{x\in E\,:\,f(x)=\infty\})\le m(\{x\in E\,:\,f(x)\ge n\}).
$$
Then by Chebychev's inequality we know for all $n\in\mathbb{N}$ that
$$
m(\{x\in E\,:\,f(x)=\infty\})\le m(\{x\in E\,:\,f(x)\ge n\})\le\frac{1}{n}\int_E f.
$$
Letting $n\to\infty$ finishes the proof.
