Q:

Cannot convert value of type 'String?' to expected argument type '_?'

I am implementing a function to retrieve IdentityID and token of a custom identity provider as part of my work to setup authentication in Amazon Cognito. I need to add the token as part of my return statement, but in my return statement, I am getting an error.
"Cannot convert value of type 'String?' to expected argument type '_?'". 
I do not understand what _? argument is exactly and how to conform to it. 
import AWSCore
/*
 * Use the token method to communicate with your backend to get an
 * identityId and token.
 */
class DeveloperAuthenticatedIdentityProvider : AWSCognitoCredentialsProviderHelper {
    override func token() -> AWSTask<NSString> {
    //Write code to call your backend:
    //pass username/password to backend or some sort of token to authenticate user, if successful, 
    //from backend call getOpenIdTokenForDeveloperIdentity with logins map containing "your.provider.name":"enduser.username"
    //return the identity id and token to client
    //You can use AWSTaskCompletionSource to do this asynchronously

    // Set the identity id and return the token
    self.identityId = resultFromAbove.identityId
    return AWSTask(result: resultFromAbove.token)
}

resultFromAbove.token is String?. and so when i use it, i get the error. However, if i just type in a string such as 
return AWSTask(result: "abcd")

This seems to be fine. What am I missing here?

A:

Change 

return AWSTask(result: resultFromAbove.token)

to

return AWSTask(result: resultFromAbove.token as NSString?)

