Added checks for params to make detecting errors be easy.