code: private NodeInterface getRelatedNode(boolean add) {
  
  		T relatedNode = null;
  
  		if ((currentObject != null) && (currentObject instanceof NodeInterface)) {
  
  			NodeInterface localNode = (NodeInterface) currentObject;
  			relatedNode = localNode.getProperty(sourceKey);
  			
  			if (relatedNode == null && add && sourceKey instanceof RelationProperty) {
  
  				final RelationProperty relationProperty = (RelationProperty)sourceKey;
  				final App app                           = StructrApp.getInstance();
  				final Class<T> relatedType              = relationProperty.getTargetType();
  
  				if (relatedType != null) {
  					
  					try {
  						relatedNode = app.create(relatedType);
  						relationProperty.addSingleElement(securityContext, localNode, relatedNode);
  
  					} catch (FrameworkException fex) {
  
  						logger.warn("", fex);
  					}
  					
  				} else {
  					
  					logger.error("Related type was null for {}", currentObject);
  				}
  			}
  		}
  
  		return relatedNode;
  	}
docs: ~--- get methods ----------------------------------------------------