Check Material C#

I Need A Way To Check The Items renderer.material Within An If Statement, And I Have Tried

if(renderer.material == "Sword") {
     WeaponDamage = 10;
}

And It Says Unexpected String. Help?

renderer.material.name