added back end  checks for hostname != nil value

Please see https://github.com/opentechinstitute/luci-commotion/issues/159 for test instructions.