> Can I have a Map<String, Dog?>
yes
> because code written in terms of Map<String, T> will assume that if map.get(someKey) is null that means someKey isn't in the map
And it can safely assume that. Map<String, T?> isn't a subtype of Map<String, T>, so passing Map<String, T?> to a place requiring Map<String, T> will not compile.
T is a subtype of T?, not the other way around. Map is defined as Map<K, out V>, meaning V is covariant.
So you can pass a Map<String, Dog> where a Map<String, Dog?> is required, but not a Map<String, Dog?> where a Map<String, Dog> is required.