Python Check If Variable Is Array