fix (Model.php) add check for null result in getConstraint