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.