@throws illegalargumentexception thrown if object is not recognised
@param object the object to get the size of, may be null
file : https_github_com_apache_commons-collections_git/src/main/java/org/apache/commons/collections4/CollectionUtils.java