Relative to this post :

https://www.quantconnect.com/forum/discussion/6577/futures-contract-untradable/p0

It's better to check price by :

   //For Issue divide by Zero
   If (contract.AskPrice !=0 && contract.BidPrice != 0)
   {}

   //For Issue NullRef
   //The Same check
   If (Contract != null)

 

Best