More concise fix for empty /etc/hosts line check
Merge pull request #10714 from terminalmage/fix-etc-hosts-parsing

More concise fix for empty /etc/hosts line check