We should not use an assert here... Either we should allow to return null by the filter and if so just not add the message and so return false or we need to throw an IllegalStateException as we should not allow null to be added