add null check to actionbar hide