if else statement in nav bar