don't set GetLength input value to negative in error case, shouldn't matter if return value checked