Do not use arrays as conditions, explicitly test against None

This should fix the problem described in https://groups.google.com/d/topic/theano-users/Pse9P5B1a-U/discussion