Add code to avoid None case