On my current project I have been using a lot of extension methods to hide things I don't like about the SharePoint API. For one I hate that the only way to determine if something is in a list, web, or group is by trying to access the item and then catch the exception. Yuck. Here is an extension method I wrote to test if a group exists in a site or not.
SPGroupCollection groups, string groupName)
SPGroup group = groups[groupName];
And here is how I use the extension method.
committeesRootWeb.SiteGroups.Add(groupName, member, user, groupName);
For a little more info check out this post: