added NPE guard for mAdapter