Attempt to modify property "params" on null