[public_key] don't try and read pubic_key when it's nil
Merge pull request #20 from sandfish8/public_key

[public_key] don't try and read pubic_key when it's nil