Add null check for a list view