use np.nan instead of None