code: private Optional<IRI> getPredicateIRI(DataRangeExpression expression) {
          if (expression instanceof Datatype) {
              return Optional.of(((Datatype) expression).getIRI());
          }
          if (expression instanceof DataPropertyRangeExpression) {
              return Optional.of(((DataPropertyRangeExpression) expression).getProperty().getIRI());
          }
          return Optional.empty();
      }
docs: if the answer is no, drop the Optional and throw an exception instead