Correct handling null in appInit