frappe.utils.sort and print.py precaution

A precaution. Though I can remove it if you think it is not needed.