Using get_object_vars to turn object into array
Testing if array or not