You can cast Gravepurge with zero targets. If you do, you'll draw a card as the spell resolves.

1/22/2011

If you cast Gravepurge with at least one target and all of those targets become illegal, the spell will be countered and you won't get to draw a card.

2/25/2015

You can cast Gravepurge with no targets. If you do, you’ll just draw a card. However, if you cast it with at least one target and all of those targets become illegal, the spell will be countered and you won’t draw a card.