casting a null Jid to string caused NRE, casting null string to Jid returned a valid Jid object
Merge pull request #18 from oli-obk/fix/jid_cast_nre