Python Check If Object Is Array