handle setting a null adapter