The preview bugfix in commit f5115349 was incorrect as it tested for the variant to be non-NULL to detect an error (rather than NULL). Fix this.