Are we sure adapter is not null at this point? Do we need a null check?