Checks if a model is dirty
Replace strlen() with is_null()
use ===
Merge pull request #3797 from lucasmichot/feature/dirty

[PROPOSAL] Checks if a model is dirty