Compare to null instead of undefined, fixes #10