get_dirty() comparison is not type safe

get_dirty() must compare using Not Identical (!==) on place of Not Equal (!=).
For example, changing null to false don't make the model dirty.
Merge pull request #1855 from rittme/patch-1

get_dirty() comparison is not type safe