Fixed support for primaryValue which == NULL [closes #30][closes #34]