An optical switch and a method of switching an optical signal