Python Check If Array Is Not None