[PDI-7243] - JSON Output Step throws NullPointerException when previewing no rows

Backport of https://github.com/pentaho/pentaho-kettle/pull/680