casting a null Jid to string caused NRE, casting null string to Jid retu...

...rned a valid Jid object