die "Not a HASH reference" unless (ref($hash_ref) eq "HASH");