Ensure string type for split function

It will safely deal with incoming parameter no matter what.