def check(doc, pointer, expected, raise_onerror=False):
    """Check if value exists into object.

    :param doc: the document base
    :param pointer: the path to search in
    :param expected: the expected value
    :param raise_onerror: should raise on error?
    :return: boolean
    """
    return Target(doc).check(pointer, expected, raise_onerror)
Check if value exists into object.

    :param doc: the document base
    :param pointer: the path to search in
    :param expected: the expected value
    :param raise_onerror: should raise on error?
    :return: boolean