Fix JSONGetMethod to prevent panics on bad input.
Fix JSONGetMethod to prevent panics on bad input.

ok @jcvernaleo

Stash-Crypto/btcd,jongillham/btcd,davecgh/btcd,ppcsuite/ppcd,qchain/btcd,1d4Nf6/btcd,BitGo/prova,Dirbaio/btcd,CryptocurrencyCabal/htcd,btcsuitereleases/btcd,decred/dcrd,stevenroose/btcd,jongillham/btcd,sysbot/btcjson,cqswxj2013/btcd,jcmincke/dcrd,jimmysong/btcd,wallclockbuilder/btcd,runeaune/btcd,ltcsuite/ltcd,wallclockbuilder/btcd,btcsuite/btcd,sysbot/btcjson,danoctavian/btcd,ltcsuite/ltcd,decred/dcrd,mathiasrw/btcd,aakselrod/btcd,jcmincke/dcrd,hectorj/btcd,jrick/dcrd,cjepson/btcd,qchain/btcd,jrick/dcrd,glv2/ppcd,tb00/btcd,soapboxsys/ombfullnode,davecgh/btcd,adiabat/btcd,Roasbeef/btcd,mathiasrw/btcd,1d4Nf6/btcd,ppcsuite/ppcd-old,adiabat/btcd,dan-da/btcd,pkothbauer/btcd,tb00/btcd,glv2/ppcd,BitGo/prova,toddfries/btcd,Dirbaio/btcd,jrick/btcd,DanielKrawisz/btcd,dajohi/btcd,stevenroose/btcd,dajohi/btcd,cqswxj2013/btcd,pkothbauer/btcd,cjepson/btcd,btcsuite/btcd,danoctavian/btcd,btcsuitereleases/btcd,Roasbeef/btcd,ppcsuite/ppcd-old,soapboxsys/ombfullnode,aakselrod/btcd,CryptocurrencyCabal/htcd,jcmincke/dcrd,DanielKrawisz/btcd,Dirbaio/btcd,hectorj/btcd,jimmysong/btcd,ppcsuite/ppcd,jrick/btcd,Cleawing/btcd,Cleawing/btcd,dan-da/btcd,runeaune/btcd,Stash-Crypto/btcd,jrick/btcd,toddfries/btcd,dajohi/btcd