Fixing hostname error

When you create a task without a host, and then try to edit it, this originally gave a 400 error because hostname was never set, and there was no check for "None". This fixes that.