Fix error

A notice is thrown when you bind a Entity to a form that has a default value of NULL
CS Fix
CS fix
CS Fix
Merge pull request #5928 from Ponsjuh/master

Fixed notice on binding entity to form
[#5928] Added unit test

- Added unit test for patch; failed prior to applying patch, passes afterwards.
Merge branch 'hotfix/5928' into develop

Close #5928