Improve params validation