ensure viewData.model not null