Fix NPE when checking null arguments in Main.