Simplify 'contains' library method.