If you just want to check if they're in your group, you can use any UnitWhatever function; all of those functions will return
nil if called with a name (instead of a unitID) that doesn't belong to someone in your group. eg. this will work the same way:
Code:
if destGUID == UnitGUID("player") or UnitClass(name) then
-- code
end
Also, looking up UnitGUID("player") on every combat log is extremely inefficient. Look it up
once when PLAYER_LOGIN fires (you're probably already doing other initialization stuff there) and store it in a file-level local variable, and compare the destGUID against that.