Allow dictionaries to contain null values.

Fixes #5986