Check whether the params object is undefined or not to prevent js error

See: https://github.com/GigaOM/legacy-pro/issues/2997