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

as mentioned in the ticket, only an additional condition was added