Mvc ViewBag - Cannot convert null to 'bool' because it is a non-nullable value type
Try:
@if (ViewBag.IsRegistration == true)
I know this is an old question, but I think I have an elegant answer, so in case anyone reads this after searching, here is mine:
@if (ViewBag.IsRegistration ?? false)