if(exists $ulm_keys{$h_tag}{$h_val}){.... #### if( exists $ulm_keys{$h_tag} and exists $ulm_keys{$h_tag}{$h_val} ) { ...