I am studying measure theory from Cohn's Measure theory textbook. If $(X, \scr A, \mu)$ is a measure space then a subset $N$ of $X$ is said to be locally null if for every $A \in \scr A $ with $\mu (A) < + \infty$, we have that $A \cap N$ is null set. Also, subset $B$ of $X$ is said to be null set if there is a set $A \in \scr A$ such that $B \subset A$ and $\mu (A) = 0$.
Now, here's what I am trying to prove: if $f: X \to \mathbb C$ and $f=0$ locally almost everywhere, that is, $\{ x\in X : |f(x)| >0 \}$ is locally null then $\int |f| \,d\mu = 0$. This claim would be true if $f=0$ almost everywhere, that is, the $\{ x\in X : |f(x)| >0 \}$ is null.
This holds true if $X$ is $\sigma$-finite. Because $\sigma$-finiteness would imply that every locally null set is null and we would be done.
The claim remains to be proved when $X$ is not $\sigma$-finite. I tried my best to prove it but could not reach anywhere. Hints to prove or disprove it will be appreciated!