Prevent crash on output image on a kernel filter without an input image