putIfNonEmpty

inline fun <T> putIfNonEmpty(key: String, list: List<T>)

Adds list under key only when it is non-empty.