guard against null / emptiness in JSON object

This avoids exception errors when completion of a chunk option with no completions available.