check for empty string passed to split()

as JS will return an array of characters in this case