fixed exception when no params passed with transitionTo and url has query params

If url template has query params and query params are not passed with $state.transitionTo() then it throws undefined exception. Assign empty object to toParams if it is undefined