Fix FutureWarning from numpy

Fix the following warning from numpy 1.9.0:
"FutureWarning: comparison to `None` will result in an elementwise object comparison in the future."
Merge pull request #41 from lordi/patch-1

Fix FutureWarning from numpy