Python Check If Variable Is Array Primitive Type