null reference $id should throw DocumentNotFoundException