Term a2 = arg2.dereference();
Term a3 = arg3.dereference();
Term a4 = arg4.dereference();
if (a1.isVariable()) {
throw new PInstantiationException(this, 1);
}
if (!a1.isSymbol()) {
throw new IllegalTypeException(this, 1, "atom", a1);
}
String label = a1.name();
if (a2.isVariable()) {
throw new PInstantiationException(this, 2);
}
if (!a2.isJavaObject() || !a2.convertible(CurrentUser.class)) {
throw new IllegalTypeException(this, 2, "CurrentUser)", a2);
}
CurrentUser user = (CurrentUser) ((JavaObjectTerm) a2).object();