✅ Null check not enough to safely convert from nullable enum

I have a class declaring an enum and a nullable value for that enum:
public readonly StdModeTypes? smt;

I then try to reference that field from a second class:
if(cmodeCur.smt != null)
    mapModesWithStdTypes[cmodeCur.smt] = cmodeCur;

Yet even with the null check, the IDE is insisting that smt could be
null
and won't let me use the value:
Error    CS1503    Argument 1: cannot convert from 'BestChat.IRC.Data.Defs.ChanMode.StdModeTypes?' to 'BestChat.IRC.Data.Defs.ChanMode.StdModeTypes'

What's going on?
Was this page helpful?