This commit replaces checks for empty strings ("".equals(...)) with the String#isEmpty method. Closes gh-32377