Updated check for params error