Ensure get_params is not called on None
COSMIT fix pep8 violations