Make writeKeyValuePairs accept Nullable args am: 17c204de33

Change-Id: I7cdfdba8a19f426bf631fd6639430da4f429660f