code: public static boolean isBlank(String input) {
          int strLen;
          if (input == null || (strLen = input.length()) == 0) {
              return true;
          }
          for (int i = 0; i < strLen; i++) {
              if (!Character.isWhitespace(input.charAt(i))) {
                  return false;
              }
          }
          return true;
      }
docs: Verify that the input is an empty string or contains only whitespace characters.<br>
  see {@link Character#isWhitespace(char)}
  
  @param input a string
  @return true if input is an empty string or contains only whitespace characters