#472, #479: Fixed filtering of NULL values