CRM-13977 related fix

----------------------------------------
* CRM-13977: activities report fails to add contacts to group - fatal error
  http://issues.civicrm.org/jira/browse/CRM-13977
Merge pull request #2273 from monishdeb/CRM-13977

CRM-13977 related fix