preventing the comparison of float and None.