Python Check If A Variable Is An Array