StringUtils in Java with Apache Commons Lang 3

isEmpty() – Check if a String is null or empty (“”)

if (StringUtils.isEmpty(name)) { }

isBlank() – Check if a String is blank (all whitespace), empty (“”), or null

if (StringUtils.isBlank(name)) { }