         }
         catch KeychainError.noGitHubClientSecret {
             var newItem = KeychainConfiguration.GitHub.Gist.Account.clientSecret.query()
-            newItem[kSecValueData as String] = encodedGitHubClientSecret as AnyObject?
+            newItem[kSecValueData] = encodedGitHubClientSecret as AnyObject
             
             let status = SecItemAdd(newItem as CFDictionary, nil)
             

        }
    }
    
    func readGitHubClientSecret() throws -> String {
        var query = KeychainConfiguration.GitHub.Gist.Account.clientSecret.query()
        
        query[kSecMatchLimit as String] = kSecMatchLimitOne
        query[kSecReturnAttributes as String] = kCFBooleanTrue
        query[kSecReturnData as String] = kCFBooleanTrue
        
        var queryResult: AnyObject?
        let status = withUnsafeMutablePointer(to: &queryResult) {

        guard status != errSecItemNotFound else { throw KeychainError.noGitHubClientId }
        guard status == noErr else { throw KeychainError.unhandledError(status: status) }
        
        guard let existingItem = queryResult as? QueryDictionary,
            let passwordData = existingItem[kSecValueData] as? Data,
            let password = String(data: passwordData, encoding: .utf8)
            else {
                throw KeychainError.unexpectedGitHubClientIdData
        }
