check explicitly for nil in to_hash, return dup of string if field is a string