Defensive coding for mainGUI

assertions