Safely prevent empty hashes