When checking for empty elements, treat empty hashes as empty too.