I have a data class "Sample" and wanted to collect all the values that are not null, in this case the result should be "name and "type". How to iterate