Add null check and simplify expression to set notifications enabled status