Fix null error when checking metadata on ad.