use default when passed value of params is blank
removed unnecessary check