Fix exception when trying to .split() a potential None-type variable