def empty_type(): id = "300527" df = ts.get_hist_data(id) print type(df) if df is None: print "None" else: print "Not Empty"