`if ex_metadata is not None` is more ideomatic