normalize_items() merged with clean_undefined()