Include the exception type name in the log message, and move below the null/empty check, since if it's null or empty it won't actually do anything