Do not use arrays as conditions, explicitly test against None
Merge pull request #1696 from lamblin/fix_scan_valueerror

Do not use arrays as conditions, explicitly test against None