Add a class conditionally. Mostly used for navs