Avoid comparison of str and None.

Should fix #15