Dictionary null handling improvements / fixes / tests