Throwing UnexpectedValueException when no array is passed.