Only delete process on interrupt if it is non-nil

In the case where a buffer was opened with an invalid encoding,
such that the user was prompted to select an encoding, it seemed
that flycheck was not fully initialised, so attempting to quit
the buffer or reset it with `normal-mode` triggered an error
due to flycheck's cleanup chain.