add tests for is_definitely_vector, fix implementation