adding an option for automatic depager
throw exception on null result