[FIX] Check for iterable before object. (#314)
[FIX] Check for iterable before object. (#314)

* Check for iterable before object.

* Check for array and traversable separately.
Maintain compatibility with php 7.0.

* Fix code style

* Move code style fixes.

laravel-doctrine/orm