base58: add paranoid return value checks