Revert "Check if application is not null before deleting it."

This reverts commit 6517ed35a92af35950721d8ed9261115b2a0283c.
Fix typo.