Adding validation when source object is null

* Changing "def" with "Object"
* Tests are missing, but i am going to add them on next commit"

@domix 
@atomsfat 
@orocesar 
@iamedu