How to deal with missing values

Does it work if N is not mutable?