Yes, the first half of the assertion (if the key $myhash{'x'} does not exist) is false, as you have shown, because Perl creates the missing key through the process of autovivification.
But the second half of the assertion (or if ... it does not contain a hash reference) is more interesting. With use strict, the assertion is true:
1:33 >perl -Mstrict -wE "my %h = (x => 17); $h{x}{y} = 42;"
Can't use string ("17") as a HASH ref while "strict refs" in use at -e
+ line 1.
1:33 >
But without strictures, the assertion is again false, and the result is (to me) quite surprising:
1:33 >perl -MData::Dump -wE "my %h = (x => 17); $h{x}{y} = 42; dd \%h
+; dd \%17;"
{ x => 17 }
{ y => 42 }
1:34 >
I don’t think I really understand this behaviour, but one thing is clear: it does provide yet another strong argument (if one were needed) to always use strict !