Follow-up to gh-1163 with simpler empty string check.