fix NoneType error

Check to make sure user and domain aren't None