Avoid dereferencing a null pointer when QMimeData is 0

QClipboard's QPA implementation of clear() calls setMimeData(0, mode),
which means mimeData can be dereferenced when it is null. Prevent this
from happening.