diff --git masquerade.module masquerade.module
index cab9cf0..c2a82e0 100644
--- masquerade.module
+++ masquerade.module
@@ -151,7 +151,7 @@ function masquerade_menu_alter(&$items) {
  * Dynamically add the CSRF protection token to the Masquerade menu items.
  */
 function masquerade_translated_menu_link_alter(&$item, $map) {
-  if (array_key_exists('page_callback', $item)) {
+  if (isset($item['page_callback'])) {
     if ($item['page_callback'] == 'masquerade_switch_user_page' && isset($map[2])) {
       $item['localized_options']['query']['token'] = drupal_get_token('masquerade/switch/' . $map[2]);
     }
