Fixed params to actually check if it is nil as opposed to assigning it nil and if it wasn't nil, actually assign it to the name variable