Never log to a None object.

While this is ok as far as the logging API is concerned, it indicates
that something went wrong in process that made the logging request.

Log entries that do not have a valid object tend to disappear.

Change-Id: I16d4bc072d1a7ca0549c21ad8e11f2961eaf056b