Check if nav has the sticky class before adding or removing it. 

Not checking for the class existence before calling addClass causes severe framerate drops as it is fired continuously during page scroll.