better null handling in sink() method