How To Check If Object Is Array Python