Fixed #2151 determine whether to array

See #2151 
```php
$robot = new Robots;
var_dump($robot->validation());
```
Throws an exception ErrorException: `First argument is not an array`