Goin' South is a comedy western, but Nicholson evidently had a "bad cold" at the time
Broadcast News is a good comedy but he isn't the main character
Heartburn is from the same writer as When Harry Met Sally and Sleepless in Seattle
Can't think of (or see on imdb) any other good comedies...
... except maybe The Fortune which is apparently one of Joel and Ethan Coen's favourite films!