I need advice majorly

So my boyfriend of 2 years called me at 2 am last night. He tried explaining to me that he thinks he might be a pathological liar? This completely caught me off guard and I had no idea how to respond. But he said he makes things up in his head and truly believes they are real, but he knows they aren't at the same time. And he explained some of the times he lied to me. I am so confused. How do I even go about handling the situation? He never lied about anything major, just things that never even mattered like he just made up stupid stories. Do I get him help? Do I stay with him? I have no idea what to do in this situation.