public static <T> T checkMemento(Object memento, Class<T> expectedMementoType, Class<?> primaryType) {
		Preconditions.checkNotNull(memento, "The memento is NULL!");
		if(!expectedMementoType.isAssignableFrom(memento.getClass())) {
			throw new IllegalArgumentException("Invalid memento for "+primaryType.getSimpleName()+" class: "+memento.getClass().getCanonicalName());
		}
		return (T) memento;
	}