should we validate indices as well to be non-null?