avoid some null pointers when pgp api is not installed