Refactor: Improve null safety and simplify branch conditioin

Change-Id: I0b8fdf34dcdd1914175ab21f7542d8e85cea7047
1 file changed