fixed handling of null values for json export