code: public static String extractAttributeEmptyCheck(Entry entry, String attributeType) {
          Attribute attribute = entry.get(attributeType);
          Attribute emptyFlagAttribute = entry.get(SchemaConstants.EMPTY_FLAG_ATTRIBUTE);
          boolean empty = false;
          try {
              if (attribute != null) {
                  return attribute.getString();
              } else if (emptyFlagAttribute != null) {
                  empty = Boolean.valueOf(emptyFlagAttribute.getString());
              }
          } catch (LdapInvalidAttributeValueException e) {
              throw new ObjectClassViolationException(e);
          }
          return empty ? new String() : null;
      }
docs: Returns the value of the first occurence of attributeType from entry.