Fixes #4 .More reliable empty string checking.