/** * Can be overloaded */ protected void checkTypes(TermType expectedBaseType, TermType argumentType) { if (argumentType.isAbstract()) throw new AbstractTermTypeException(argumentType); if (!argumentType.isA(expectedBaseType)) { throw new IncompatibleTermException(expectedBaseType, argumentType); } }