don’t return None in generate_flat_dict