How to check if current page is a group entity?
You can get the object for the current page in Drupal 7 using menu_get_object().

if ($group == menu_get_object('group')) {
  // do something with $group
}