Added a debug log line to see if an object is being constructed with a
null pointer as I suspect.