make test for null comparison more generic