fix invalid-null-argument UBSAN error in math_cpu.cc
fix invalid-null-argument UBSAN error in math_cpu.cc

Add an if statement to check if the destination buffer is not nullptr.

Yangqing/caffe2,Yangqing/caffe2,Yangqing/caffe2,xzturn/caffe2,caffe2/caffe2,xzturn/caffe2,Yangqing/caffe2,Yangqing/caffe2,xzturn/caffe2,xzturn/caffe2,xzturn/caffe2