You must check that all objects are zero or not. Utente , Utente.Ruolo and Utente.Ruolo.SysAdmin may be empty:
@if (ViewBag.Utente != null) { if (ViewBag.Utente.Ruolo != null) { if (!string.IsNullOrEmpty(ViewBag.Utente.Ruolo.SysAdmin)) {
source share