Change if block to correct ending

I've found a mismatched `endtry` thanks to https://github.com/dbakker/vim-lint