check presence of cdm before relying on it