protected void validate(IFn vf, Object val) { try { if (vf != null && !RT.booleanCast(vf.invoke(val))) throw new IllegalStateException("Invalid reference state"); } catch (RuntimeException re) { throw re; } catch (Exception e) { throw new IllegalStateException("Invalid reference state", e); } }