     }
     private func toObject() -> [String: AnyObject] {
         var p: [String: AnyObject] = [ "name": name ]
-        if let v = teamId { p["teamId"] = v }
+        teamId.map { p["teamId"] = $0 }
         if count(inviteMembers) > 0 { p["inviteMembers"] = inviteMembers }
         if count(inviteMessage) > 0 { p["inviteMessage"] = inviteMessage }
         return p

    }
    private func toObject() -> [String: AnyObject] {
        var p = [String: AnyObject]()
        if let v = count { p["count"] = v }
        if let v = from { p["from"] = v }
        if let v = direction { p["direction"] = v.rawValue }
        return p
    }
}

            return form.toObject()
        case .DownloadAttachment(let (_, _, _, _, type)):
            var p: [String: AnyObject] = [:]
            type.map { p["type"] = $0.rawValue }
            return p
        case .DownloadAttachmentWithURL(let (_, type)):
            var p: [String: AnyObject] = [:]
            type.map { p["type"] = $0.rawValue }
            return p
        default:
            return [:]
