added docs for contains function

(cherry picked from commit 399550e459b67e3c9ee0e911ebd3339dad92e749)
Explain error in `contains` doc

(cherry picked from commit 8a8e840b2be710705cac0ac467564739f1eb0e92)