Fix NPE in explain with no exec or scanmode