Add a test for an empty string and raise an exception if that happens. Also improved unit tests to handle this case.