removed endpoint not null check