Check whether a module is installed – Magento

<?php

$modules = Mage::getConfig()->getNode(‘modules’)->children();
$modulesArray = (array)$modules;

if(isset($modulesArray[‘Mage_Blogl’])) {
echo “Blog module exists.”;
}

?>