Pecorino Romano or Grana Padano have similar salty and nutty flavors and can be used instead of Parmesan cheese in pesto. For a dairy-free alternative, simply substitute the parmesan with extra nuts in your pesto. Slivered almonds, walnuts, cashews, and pine nuts make for a great substitute.