Use a null-safe equals. Fixes #127.