Check if a NULL pointer should be converted into a QVariant