I assume you removed this because it seems redundant to the `npv` check inside of `get_pvcards`.  However, we still need to guard against NULL pointers to avoid segfaulting.  I propose we move the NULL check to `get_pvcards`.  I will file a PR against your branch shortly with what I have in mind.