Ensure string type for split function