How to remove 'null' values for 'Binary Statement' in exported PDF reports

I am trying to generate a report and have a couple of variable assignments. For example:
'Define Expected Value. 'def expected = ‘Test’

This is logged as:

Here is the discussion link for reference:

Any help would be appreciated.

Screenshot_1.png