Simplifying / reducing the isEmptyString() function