Minor null pointer fix in Scanner