Check If Nan In Array Python Initialize Dictionary