<?php

$undesired_types = array('book');
if ( arg(0) == 'node' && is_numeric(arg(1)) ) {
  $node = menu_get_object(arg(1));
  dprint_r($node->type);
  return !in_array($node->type, $undesired_types);
}

// Or is it a path we care about
$path = $_GET['q'];
$unwanted_paths = array('/apachesolr_search/');
foreach ($unwanted_paths as $unwanted) {
    $pos = strpos($path, $unwanted);
     if ($pos !== FALSE) {
        return FALSE;
     }
}
return TRUE;
?>