MethodCodec constructor Null safety

MethodCodec()