fix(dynamo): sort_validator crashes with IndexError when dim is omitted (#4487)