Fix NPE when serializing OWS exceptions

Fixes an NPE when serializing exceptions with NULL messages.