perf: move less expensive condition first
perf: move less expensive condition first

Co-authored-by: gavin <6ffb0d8c50bc09d01d54428b8baf1689144565f4@gmail.com>
frappe/frappe,yashodhank/frappe,yashodhank/frappe,yashodhank/frappe,yashodhank/frappe,StrellaGroup/frappe,StrellaGroup/frappe,frappe/frappe,StrellaGroup/frappe,frappe/frappe