Handle blank messages

If no error message is supplied then don't add the span. Previous fixes have simply added an empty span but this skips the DOM manipulation.