Use Context.getType instead of Context.getModule to check that every module has its main class.