Bug Fix: Application crashes on registering with empty host

This patch checks for empty host name, while registering to the courier server.