According to Jim: Season 3, Episode 9
Jim creates an imaginary friend to avoid going to a couple's baby shower with Cheryl.