How To Check If A Variable Is Nan In Python