Python Check If Data Type Is Array An Object