[DDC-2234] FUNCTION() IS NULL comparison

This patch fix DDC-2234: 
http://www.doctrine-project.org/jira/browse/DDC-2234