aggregate_logs: Handle NULL log contents

The log content is NULL when the log content has been purged. It is
unlikely that an aggregation is queued for such a log, but fully
possible, and easy to deal with.