Adding validation when source object is null