Yes, you're right. Contracts.assertNotNull shoudn't have been used in the first place. I will move this call to a proper call to the logger with the object toString in the log message.