Bug fix for local entity queries for null dates