The nitrogen rule for mass spectrometry is not a rule per se but a principle. It is true for unit masses, but not for accurate mass measurements. There are better ways of telling if nitrogen atoms are present or not. For gas chromatography using a nitrogen sensitive detector like an AED (Atomic Emission Detection) or an ECD/NPD (electron capture and nitrogen-phosphorus detection) would be sufficient.

Nitrogen rule: Neutral molecules which have an odd nominal mass also posses an odd number of nitrogens. There are also similar rules for charged species. Why is the nitrogen obsolete (not defined) for accurate mass measurements of complex mixtures?

Molecular Formula Nitrogens Isotopic Mass Nitrogen Rule
for accurate masses
Integer Mass Nitrogen Rule
for integer masses
C45H75NO15 1 869.51364400 FALSE 869 TRUE
C45H71N7O10 7 869.52621460 FALSE 869 TRUE
C49H75NO12 1 869.52889900 FALSE 869 TRUE
C47H75N5O10 5 869.55136500 FALSE 869 TRUE
C50H95NO10 1 869.69556100 FALSE 869 TRUE
C36H42N2O23 2 870.21782620 TRUE 870 TRUE

A test performed on 17,000 molecular formulas between 27 u and 60,000 u resulted in ~21% wrong assignements of odd or even number of nitrogens when using the nitrogen rule. The nitrogen rule for accurate mass measurements works well for compounds under 500 u (not all elements allowed). A direct interpretation of mass spectral fragmentations may have a higher impact. I would consider this principle as a kind of educational rule which mass spectrometry teachers use to pester their pupils with. Infact I used this rule only once in the last 30 years, but maybe I just do not appreciate it enough.

Of course there is still a way out, using generated formulas from an accurate mass measurement one can calculate the nominal mass (integer mass) and apply the nitrogen rule - in this way it works - but then you know already the exact number of nitrogens - so its of no great use.

Additional Link: Read in Books - what experts have to say about the nitrogen rule.