Fixed #11675 ValueToDuplicatesTransformer accept "0" value

Fixed wrong return null syntax

Added transformation to null on empty arrays

Removed useless statement in condition and switched to yoda condition