NameRefPair.equals() now checks if ref is null before comparing it.
Related to issue #22