Python Check If Object Is Array Primitive Type