added check if action should be displayed before calling a actionbar method