Add appendIf(..) method and tests for MessageStringCollector