Add debugging for NPE in GeneralOptimizationDialog