Fixing the bug with one line.

In order to avoid the NullPointerException in the subsequent code, the string periodAndException should be empty instead of null.