Use yoda conditionals, as per advice of @garyj.