Use a literal as watchdog empty key

This is required as Oracle is unable to use null and empty values
Fix very strange issue in NICE regarding while loop

Walking thru a hash using each stopped working without reason?
Replaces the while loops with foreach