code: static void validateEntityLabel(EntityType entityType) {
      String label = entityType.getLabel();
      if (label != null) {
        if (label.isEmpty()) {
          throw new MolgenisValidationException(
              new ConstraintViolation(
                  format("Label of EntityType [%s] is empty", entityType.getId())));
        } else if (label.trim().equals("")) {
          throw new MolgenisValidationException(
              new ConstraintViolation(
                  format("Label of EntityType [%s] contains only white space", entityType.getId())));
        }
      }
    }
docs: Validates the entity label: - Validates that the label is not an empty string - Validates that
  the label does not only consist of white space
  
  @param entityType entity meta data
  @throws MolgenisValidationException if the entity label is invalid