null check on adapter