You might also want to verify that you're on a system that considers empty string as null, as we're doing in other places (see my comment on the jira issue):

  and '' is null