FIX ValueError was not being raised

len(indptr) is always greater that 0 because its initialized with non-empty list.
Because of that this branch is never taken and the ValueError never raised.