You don't need the custom function. You could directly use:
```java
Joiner.on(",").skipNulls().withKeyValueSeparator(":").join(tags)
```