There is ‘nonmissingtype’ that does this for ’Missing’. You could look at it’s definition and do the same for ‘Nothing’.