Check es for type and doc what is expected.