Better  empty string error checking