simplify getOpType by using Enum's static function valueOf

simplify getOpType in WriteType and ReadType by using Enum's static function valueOf
Cab you remove this function? Not needed