AbstractObject: _unique fix

First we need to check if array and only then use count().