Added not-null guards to UI delegates