I think that if this last bit is reached it also means that the argument is not a string, so I think the message should say something like: _Unsupported type. Group object, or group href, or group name required._.