added null check for manager