This seems bad. Isn't the intent here to remove nil values from the hash? It seems that it would be better to delete the key instead.