Yep, Leslie Nielson's characters were always the straight guy, completely unaware of his own cluelessness and the insanity around him, much of which was caused by himself. That's why it worked.
Same with Peter Graves. I remember seeing an interview with Peter Graves about Captain Oveur from "Airplane!" and how first of all, he had no idea why they would want him to be in a comedy, since he definitely was not known for his comedic chops. One of his friends, a fellow actor (I forget who), told him that the secret to comedy is that the characters don't know they're in a comedy. You play it completely straight, and that's what makes it funny. It made no sense to him, but he decided to at least check out the script. What?! An airline pilot asking a little boy about Turkish prisons and gladiator movies? People would think he's some kind of homosexual pedophile. But his friend told him that that's what's so funny. Nobody could ever imagine Jim Phelps saying that, so it's perfect. So Graves did it, and still had no idea why it was so damned funny, but people loved it.