The idea that there are no viruses for the Mac goes back to the beginning of Mac OS X, at the very beginning of this millennium. Most people associate this idea most strongly with the “I’m a Mac/I’m a PC” commercials from a decade ago, such as this one that ran in 2006:
Unfortunately, this is a myth. As with most good myths, though, there’s a slight element of truth.