Fix a potential NPE.
Make sure java.rmi.server.hostname is set on jmx url change.