Maybe I missed something but does the new state is not a way to replace those null check ? If yes I feel like we should keep the logic but I could have missed something.