Make list_entry, hash_entry more type-safe.