Fixed: AttributeError when params is None.

Without this, AttributeError is thrown when params is None.