Do not crash if input is a null pointer
Currently, it is asserted that input isn't null, but that will change.