Check what we are freeing before we free it

parser could be NULL or parser->state could be NULL. You would get some fun
errors if that happened
Update generated C
Simplify check for NULL since free is indifferent to it
Merge pull request #1 from sigmavirus24/careful-destroy

Careful destroy