Added validation to make sure that the ads namespace is available.