Check for pr_num before converting it to an int