More elegant way to check for empty string