Cleaning values before creating DOM