Exactly. One of the reasons Gandalf (and the Hobbits for that matter) is such a great character is he's not some horrible anodyne, vanilla 'hero' dreamt up by a focus group to be perfect and conform to the agenda of the modern world. So he smokes and probably drinks, and he's sarcastic? So much the better!
Watch modern films and TV and it seems any smokers/drinkers are automatically evil because this is lazy writers' shorthand for 'bad guy', tut tut.

Gandalf isn't 'PC' and that's good!