private Converter lookup(Type type, Value value) throws Exception {
   type = type.getType();
   if (value != null) {
     type = value.getType();
   }
   return registry.lookup(type);
 }
 private Value read(Type type, NodeMap nodemap, Value value) throws Exception {
   Converter converter = lookup(type, value);
   nodemap = (InputNode) nodemap.getNode();
   type = value;
   if (converter != null) {
     type = ((Type) (converter.read(nodemap)));
     if (value != null) {
       value.setValue(type);
     }
     type = new Reference(value, type);
   }
   return type;
 }
 private boolean isReference(Value value) {
   return value != null && value.isReference();
 }