Mismatched types. expected `NonFungibleToken.NFT`, got `NonFungibleToken.NFT?`

I was using Cadence and met this error code. Please let me know the solution.

If you post your code then I can give more detailed advice but it’s almost certainly the case that you need to add ?? panic("failed to borrow NFT") after whichever call you expected to return the NonFungible.NFT value.

Explanation: The function you’re calling is returning an optional value, not the value itself. You can tell because the type ends in ?. You can resolve an optional with ?? then some value but often you want to abort the transaction using panic if the value does not exist or is not available.

thank you!!