Fixed NPE on null InputStreams.