Fix crash on nil log