Could you add some input validation (!= null, !var.isEmpty(), limit > 0, offset >= 0) please?