This exception should be in a more general case not just when an array is passed?