Factorize nil case handlers to the super class InputFilter.

Was just reading mutations' source code and though this refactoring would make sense.