Make dataAdapter conditional