Python Test If Variable Is A List