Fix null check faillure at authorization