This is to avoid less concise, full blown if else. Probably would have been clearer with '!r.nil? &&' instead.