Handle nil or unexpected values better when typecasting.
Handle nil or unexpected values better when typecasting.

Signed-off-by: John Nunemaker <70e8fe1b9b8cfc792cf4fe22f222a791cdb42e7f@gmail.com>
jordanpagewhite/httparty,supremebeing7/httparty,kristjan/httsoiree,wakermahmud/httparty,jordanpagewhite/httparty,bob-frost/httparty,jayjlawrence/httparty,lstoll/httpserious,bob-frost/httparty,RobinsonKameron/httparty,eibay/httparty,jnunemaker/httparty,caius/httparty,tokafish/httparty,tokafish/httparty,supremebeing7/httparty,rayzhng/httparty,caius/httparty,charliesome/httpserious,ffleming/httparty,kristjan/httsoiree,MichaelWiss/httparty,rayzhng/httparty,sideci-sample/sideci-sample-httparty,lstoll/httpserious,sferik/httparty,killerwails/httparty,sferik/httparty,jordanpagewhite/httparty,jpb/httparty,dpatlut/httparty,rayzhng/httparty,MichaelWiss/httparty,jpb/httparty,RobinsonKameron/httparty,supremebeing7/httparty,jayjlawrence/httparty,landonwilkins/httparty,kristjan/httsoiree,josal/httparty-mine,eibay/httparty,landonwilkins/httparty,charliesome/httpserious,dpatlut/httparty,jayjlawrence/httparty,tokafish/httparty,MichaelWiss/httparty,charliesome/httpserious,ffleming/httparty,ffleming/httparty,dpatlut/httparty,lstoll/httpserious,landonwilkins/httparty,wakermahmud/httparty,killerwails/httparty,sideci-sample/sideci-sample-httparty,jnunemaker/httparty,eibay/httparty,wakermahmud/httparty,RobinsonKameron/httparty,jnunemaker/httparty,jpb/httparty,killerwails/httparty,bob-frost/httparty,josal/httparty-mine