fixed handling of data objects that implement IDictionary<K,V> but that do NOT implement IDictionary
Fixed null test and normalized whitespace.