Let $(X, d)$ be a metric space and $\mathcal P(X)$ the space of all Borel probability measures on $X$. I'm reading below theorem in this lecture note.
Lemma 6.2. Suppose $\mu, \mu_1, \mu_2,\ldots \in \mathcal P(X)$ such that $\mu_n \to \mu$ weakly. Then for any lower semicontinuous, bounded below $g: X \rightarrow \mathbb{R} \cup\{+\infty\}$, $$ \liminf _{n \rightarrow \infty} \int g d \mu_{n} \geq \int g d \mu. $$
This result also appears as Theorem A.3.11. in Dupuis's textbook A weak convergence approach to the theory of large deviations.
For sure, the lower semicontinuous function $g$ is measurable, but not necessarily integrable. Take $x \mapsto e^x$ as an example. How can we take the limit $$ \liminf _{n \rightarrow \infty} \int g d \mu_{n} $$ if there are some $g$ and $N$ such that $$ \int g d \mu_{N} = +\infty? $$
As @KurtG. mentioned in a comment, the fact that $g:X \to \mathbb R \cup \{+\infty\}$ is l.s.c. and bounded from below ensures that $\int f \mathrm d \mu \in \mathbb R \cup \{+\infty\}$. On the other hand, the convergence in $\mathbb R \cup \{\pm\infty\}$ is well-defined with the order topology mentioned here and here.