public static <V> ReferenceVertexProperty detach(final VertexProperty<V> vertexProperty) {
        return vertexProperty instanceof ReferenceVertexProperty ? (ReferenceVertexProperty) vertexProperty : new ReferenceVertexProperty<>(vertexProperty);
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceFactory.java