implemented from_str for operatortypes