Yes. An equal amount of shelled walnuts is a great swap, followed by almonds. Other nuts like pistachios work as well, but have a stronger flavor that can interfere with the fresh basil. If you'd like to make pesto without nuts at all, sunflower seeds may be an acceptable substitute.