handle undefined before trying to split