Check empty string correctly.

Adds to #3.