how to check if given object (not function) is an array ?