             return form.toObject()
         case .SaveReadTopic(let (topicId, postId)):
             var p: [String: AnyObject] = [ "topicId": topicId ]
-            if let v = postId { p["postId"] = v }
+            postId.map { p["postId"] = $0 }
             return p
         case .GetMentions(let (from, unread)):
             var p: [String: AnyObject] = [:]
-            if let v = from { p["from"] = v }
-            if let v = unread { p["unread"] = v }
+            from.map { p["from"] = $0 }
+            unread.map { p["unread"] = $0 }
             return p
         case .CreateTopic(let form):
             return form.toObject()
         case .UpdateTopic(let (_, name, teamId)):
-            var p: [String: AnyObject] = [:]
-            if let v = name { p["name"] = v }
-            if let v = teamId { p["teamId"] = v } else { p["teamId"] = "" }
+            var p: [String: AnyObject] = [ "teamId": teamId ?? ""]
+            name.map { p["name"] = $0 }
             return p
         case InviteTopicMember(let (_, inviteNames, inviteMessage)):
             var p: [String: AnyObject] = [:]

    }
    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
    }
}

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