Elements should be added only if they are not null