Check If A Variable Is Nonetype Python