Object (@NotNull Object o) { if (o instanceof Pointer || o instanceof ID) { return o; } else if (o instanceof String) { return nsString((String)o); } else { throw new IllegalArgumentException("Unsupported type! " + o.getClass()); } }