Missing exception description - how about:

    if (!is<array>()) throw type_mismatch("type mismatch! array query attempted on non-array value");