Fix for este.Model.toJson

It was crashing when attribute was null or undefined.