allow cmp-pointer to be NULL