added method to check if a qvariant can be a string