fixed drainTo bug that when collection is null , we lost the drained val...

...ues and some test corrections
tiny one but it seems better to me to make pre-condition check before ```getNodeEngine()```