Fix NPE from retrieving a null input.