Determines whether a given module exists.
as of Drupal 8.0. Use Drupal::moduleHandler()->moduleExists($hook).
\Drupal\Core\Extension\ModuleHandler::moduleExists()
function module_exists($module) {
return Drupal::moduleHandler()
->moduleExists($module);
}