Merge branch 'issue#4041' into 'develop'

Added an additional check to ensure that unique field restrictions don't honor null values.

Closes #4041

See merge request !3853
Status Job ID Name Coverage
  Unit
passed #6668
phpunit

00:01:03

 
  Acceptance
passed #6669
juice
codeception

00:04:39