accept nil function for set-sql-reader