changed the check of the presence of paramName by using hasOwnProperty method