replace null return where possible