consistently turn empty, 'inf', and 'nan' values into None values