Been struggling with this for a while now, where a forms output potentially has a "null" in the output data, this can be because the form has a branching option to bypass certain selections resulting in "null" output or the user just plain didn't select any option from the choice available...
My entire flow...




My aim is to create a word document / report with the collected data from the form response and store in SharePoint, I followed this tutorial by I used @DamoBird365 Microsoft Forms to PDF – No Premium Actions - DamoBird365 to create the word document and populate SharePoint columns. The columns on SharePoint are based upon defined content types. The word template then pulls the content type field definitions (using Quick Parts in Word app) and should be updated based upon user input. All was working fine until I had to deal with unwanted characters i.e., "["/"] etc. that were coming through with certain data. I then used the suggestions to rid myself of the unwanted characters by again following instructions from Easily address escaped characters in Forms Response - DamoBird365.
Here is where the "fun" began...
The instructions work great when an option is selected and there is data in the field, but... when nothing is selected or the option to select is bypassed because of a forms branch then you get all kinds of strange behaviour...
Dealing with an empty date field was simple enough just declare a compose statement as follows:

Dealing with the unwanted characters was going ok until I hit the NULL input data
definition:

test result:

and when this input NULL is for a multi-line column type it is a whole different ball game... So, I started experimenting with initialising variables to store the "empty" data and then try and work with the empty data field, but I keep running into different error messages...
'The template language function 'json' expects its parameter to be a string or an XML. The provided value is of type 'Object'. or
'The template language function 'join' expects its first parameter to be an array. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#join for usage details.'.
So, I decided to try the coalesce function to default any NULL field received and then use this ' ' empty data to process in my string formats or list formats

but still flow complains...
definition:

test result:

Should I be changing this coalesce statement to the following, to hopefully take care of any type of NULL data i.e., coming through as a string, array or object?
coalesce(null, null, null)
any guidance or assistance will be appreciated, as can be seen by my other post here I've been struggling for a while trying to get around this problem....
Query regarding Apply to each loop to remove unwan... - Power Platform Community (microsoft.com)
Thanks.