Changed QVariant checks from isValid into is not None

as suggested by Florian here:
http://www.riverbankcomputing.com/pipermail/pyqt/2014-August/034652.html