I would just write `if ($query) {`