useless checks were removed
Merge pull request #699 from ezhikus/free_and_delete

It is safe to "free(NULL)" and "delete NULL"