Add null check when closing the appender. Solves an issue with grails th...

...at crashes on startup.