Yes, you can leave the cheese out and the pesto is still great! I would add a little more salt to make up for the cheese not being there, as it has its own saltiness. A quarter teaspoon of salt would be a great start, and give it a taste to see if it needs more from there.