Adds check to ensure that params is set before appending '?'