Added a null check to the length checks.
Fixed the ArgumentOutOfRangeException to display the property which was out of range.