This is a thing physicians say but often don't heed themselves, and I don't think it singles out cannabis in particular.
The thing that horrifies me the most is physicians who smoke. There's an activity of which there is no safe level of doing other than "none", plus they've definitely seen what a smoker's lung looks like, and yet I've seen plenty of doctors who smoke regularly.