move check isModuleAvailable to the helper file