Avoid nil dereference in Queryx/QueryRowx on error