Check that errorObject is actually an object before sending it along to the logger