handling cases where output is now nil (didn't matter before because of the exception that was thrown)