docs: @SuppressWarnings("unchecked")
  	@Nullable
  	public EmbeddedWrapper wrap(@Nullable Object source, LinkRelation rel) {
  
  		if (source == null) {
  			return null;
  		}
  
  		if (source instanceof EmbeddedWrapper) {
  			return (EmbeddedWrapper) source;
  		}
  
  		if (source instanceof Collection) {
  			return new EmbeddedCollection((Collection<Object>) source, rel);
  		}
  
  		if (preferCollections) {
  			return new EmbeddedCollection(Collections.singleton(source), rel);
  		}
  
  		return new EmbeddedElement(source, rel);
  	}