Added a condition to check for empty documents in sentence splitter.