Check length of data.AD only if not none