Fix NullPointerException thrown by providing invalid parameters
Looks like our recent changes from a few weeks ago introduced a NullPointerException
when the user provides invalid paramters. For example, this request for IP address 86.59.21.3k throws such an exception. Should be relatively easy to resolve. Reported by ln5.