ref($x) eq 'HASH' or die "D'oh! \$x must be a hash!";