Adds a check to make sure the closeButton option is set before focusing